The Twelve-Factor App

The Twelve-Factor App:

12 factor is an interesting way to think about medium to large scale app development. I don’t use or agree with all of the ideas here, but at the very least this is a great starting point for developing your own methodologies. 

[From my blog.]

2 Comments

Yes - some useful and interesting development standards.

I find the 12-app idea of logging to STDOUT interesting. On the one hand with Perl it is much easier to say

open() or die ($!);

than

open() or $log->log_and_die($!);

But on the other hand the application developer knows how to filter different levels of logging with $log->debug, $log->info, $log->warn etc. If everything is just a print statement, then level information is lost.

I have always used loggers for reasons of stamping log with level information, class information and timestamps, but wonder if the code would be neater with just simple print, warn and die statements?

I don't think the 12-factor app guide precludes using a logger object. It just recommends to log to stdout by default, which is doable even if we use a logger object.

Leave a comment

About JT Smith

user-pic My little part in the greater Perl world.