Background
It has been a long time coming for me to switch out of PHP for my main programming language. I have been working with PHP for years and have grown tired of the limitations/issues. It has been hard for me to convert, being that there are always jobs for PHP programmers out there and I gotta eat! For me, the aggravation coming with working with PHP has forced me to switch.
Why do you hate PHP?
I don't hate PHP at all. The language itself has many advantages like a great community, numerous libraries (although how many different MVC frameworks can you have?), great documentation, and ease of entry. There are libraries to connect PHP to virtually every database, REST API, or other third party software. These are all reasons I began using the language in the first place.
PHP is supported on virtually every web hosting company on the planet, making PHP a useful skill to have. There are some great open source frameworks and apps like WordPress, Zend, Joomla and too many others to list.
Why no more PHP? First, I should probably clarify that I will continue to use PHP as many of the projects I'm working on still use PHP. However, there are many quirks about PHP that have been bothering me. I won't go into detail because I will not be saying anything new about the subject. If you want to read the most epic of rants on PHP issues, see this post.
Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts
Sunday, July 8, 2012
Monday, June 4, 2012
Centralized Logging with Codeigniter
Background
In a previous article I spoke about the search for a logging system. Having decided on Loggly, I needed a way to integrate logging in both my API and application.
Setup
All of my servers needed to be set up to pass syslog messages onto Loggly. I was using Ubuntu and there was an easy walk through on the Loggly wiki here. I grouped all of my servers in the "Production" group so that all logs were searchable under one group. I could have separated the groups (or inputs as Loggly calls them) into an "Application" and "API" group but thought that combining them together would help me search for issues more efficiently.
After the initial setup, I found that cron messages were immediately filling up my logs with unnecessary information. Messages similar to the one below were common.
pam_unix(cron:session): session opened for user root by (uid=0)
I wanted to remove those messages from Loggly. I had to go into /etc/syslog-ng/syslog-ng.conf and edit the filters to ignore cron messages.
log {
source(s_all);filter(f_cron); destination(d_loggly);
};
Subscribe to:
Posts (Atom)