Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

jifty::logger(3pm) [debian man page]

Jifty::Logger(3pm)					User Contributed Perl Documentation					Jifty::Logger(3pm)

NAME
Jifty::Logger -- A master class for Jifty's logging framework DESCRIPTION
Jifty uses the Log4perl module to log error messages. In Jifty programs there's two ways you can get something logged: Firstly, Jifty::Logger captures all standard warnings that Perl emits. So in addition to everything output from perl via the warnings pragmas, you can also log messages like so: warn("The WHAM is overheating!"); This doesn't give you much control however. The second way allows you to specify the level that you want logging to occur at: Jifty->log->debug("Checking the WHAM"); Jifty->log->info("Potential WHAM problem detected"); Jifty->log->warn("The WHAM is overheating"); Jifty->log->error("PANIC!"); Jifty->log->fatal("Someone call Eddie Murphy!"); Configuring Log4perl Unless you specify otherwise in the configuration file, Jifty will supply a default Log4perl configuration. The default log configuration that logs all messages to the screen (i.e. to STDERR, be that directly to the terminal or to the FastCGI log file.) It will log all messages of equal or higher priority to the LogLevel configuration option. --- framework: LogLevel: DEBUG You can override the LogLevel configuration option by setting JIFTY_LOG_LEVEL in your environment. You can tell Jifty to use an entirely different Logging configuration by specifying the filename of a standard Log4perl config file in the LogConfig config option (see Log::Log4perl for the format of this config file.) --- framework: LogConfig: etc/log4perl.conf Note that specifying your own config file prevents the LogLevel config option from having any effect. You can tell Log4perl to check that file periodically for changes. This costs you a little in application performance, but allows you to change the logging level of a running application. You need to set LogReload to the frequency, in seconds, that the file should be checked. --- framework: LogConfig: etc/log4perl.conf LogReload: 10 (This is implemented with Log4perl's init_and_watch functionality) METHODS
new COMPONENT This class method instantiates a new "Jifty::Logger" object. This object deals with logging for the system. Takes an optional name for this Jifty's logging "component" - See Log::Log4perl for some detail about what that is. It sets up a "warn" handler which logs warnings to the specified component. _warning_action change the Log4Perl action from warn to error|info|etc based on the content of the warning. Added because DBD::Pg throws up NOTICE and other messages as warns, and we really want those to be info (or error, depending on the code). List based on Postgres documentation TODO: needs to be smarter than just string matching returns a valid Log::Log4Perl action, if nothing matches will return the default of warn since we're in a __WARN__ handler AUTHOR
Various folks at Best Practical Solutions, LLC. Mark Fowler <mark@twoshortplanks.com> fiddled a bit. perl v5.14.2 2011-02-09 Jifty::Logger(3pm)

Check Out this Related Man Page

Jifty::Action::Record::Create(3pm)			User Contributed Perl Documentation			Jifty::Action::Record::Create(3pm)

NAME
Jifty::Action::Record::Create - Automagic creation action DESCRIPTION
This class is used as the base class for Jifty::Actions that are merely creating Jifty::Record objects. To use it, subclass it and override the "record_class" method to return the name of the Jifty::Record subclass that this action creates. METHODS
arguments Set the default value in each of the fields to whatever the default of the column is in the model take_action Overrides the virtual "take_action" method on Jifty::Action to call the appropriate "Jifty::Record"'s "create" method when the action is run, thus creating a new object in the database. The "id" of the new row is returned in the "id" content of the Jifty::Result for the action. You can use this in conjunction with request mapping in order to give later parts of the request access to the "id". create_record This method actually performs the call to "record->create". It receives as arguments the parameter hash and should return the message for the user, indicating success or failure. report_success Sets the "message" in Jifty::Result to default success message, "Created". Override this if you want to report some other more user- friendly result. possible_columns Create actions do not provide fields for columns marked as "private" or "protected". _extra_validator_args Passes "for => 'create'" to validators. _extra_canonicalizer_args Passes "for => 'create'" to canonicalizers. _extra_autocompleter_args Passes "for => 'create'" to autocompleters. SEE ALSO
Jifty::Action::Record, Jifty::Record LICENSE
Jifty is Copyright 2005-2010 Best Practical Solutions, LLC. Jifty is distributed under the same terms as Perl itself. perl v5.14.2 2010-12-10 Jifty::Action::Record::Create(3pm)
Man Page