06-28-2013
Just tried logger and it triggers the alert in the messages. I did not know *.info means to log everything info or above. Thanks a log guys for the help, I got the answer I was looking for
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Can anyone tell me if there is a way to remove the encryption from Data CDs by UNIX? Or does anyone know of a program that can remove the encryption?
I would much appreciate it!
Thanks,
-Peaves (2 Replies)
Discussion started by: Peaves
2 Replies
2. UNIX for Dummies Questions & Answers
Ok what is BSD exactly? I know its a type of open source but what is it exactly? (1 Reply)
Discussion started by: Corrail
1 Replies
3. Programming
Hello. I'm a complete newbie to C programming. I have a C program that wasn't written by me where I need to write some wrappers around it to automate and make it easier for a client to use. The problem is that the program accepts standard input to control the program... I'm hoping to find a simple... (6 Replies)
Discussion started by: Xeed
6 Replies
4. Solaris
I'm reading through this guide, BigAdmin Feature Article: Using Solaris JumpStart With the Solaris 10 OS for x86/x64 Platforms, and I was wondering if there was more to the bash scripts than just the example given (see above link) like for begin1 and begin2 and finish1 and finish2. I don't know... (3 Replies)
Discussion started by: Bradj47
3 Replies
5. Shell Programming and Scripting
I am having trouble making this statement work. I am passing in a number value for the number of days to keep archive logs for and wanted to make sure that it is a number. I have a script that will return 1 for is a number and 0 for is not a number. I also want to make sure that the number is not... (2 Replies)
Discussion started by: gandolf989
2 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I have a (probably) very simple tar question on a Solaris box that I'm a little embarrassed to ask. After repeatedly checking man tar and searching for solutions online (I'm not sure of the correct "keywords" to look for)
The question is:
If I were to use the command:tar cf... (4 Replies)
Discussion started by: chatguy
4 Replies
7. UNIX for Dummies Questions & Answers
Hello, I have a quick question that is not related to homework in any way shape or form (in case anyone wanted to know). My question is thus:
I have a file "temp" that has the two values say "5" and "3" (separated by a white space). Now, I want to simply write an if-else statement that reads... (10 Replies)
Discussion started by: astropi
10 Replies
8. Shell Programming and Scripting
Hello all!
This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician.
Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix:
... (16 Replies)
Discussion started by: torchij
16 Replies
9. Shell Programming and Scripting
Hi, guys, I'm a new comer here. I'm studying Unix Shell and I met a problem confusing me a lot. Here it is :
script 1:
#!/bin/sh
# scriptname : do_increment
increment(){
sum=`expr $1 + 1`
return $sum # Return the value of sum to the script.
}
echo -n "The sum is "
increment $1 # Call... (2 Replies)
Discussion started by: franksunnn
2 Replies
10. Shell Programming and Scripting
Sorry for stupid question, but why this script gives that output?
$ awk 'BEGIN { well=56789; print 1234$well }'
1234
I expected 123456789 (9 Replies)
Discussion started by: silyin
9 Replies
LEARN ABOUT DEBIAN
moosex::log::log4perl::easy
Easy(3pm) User Contributed Perl Documentation Easy(3pm)
NAME
MooseX::Log::Log4perl::Easy - A role for easy usage of logging in your Moose based modules based on MooseX::Log::Log4perl
SYNOPSIS
package MyApp;
use Moose;
use Log::Log4perl qw(:easy);
with 'MooseX::Log::Log4perl::Easy';
BEGIN {
Log::Log4perl->easy_init();
}
sub foo {
my ($self) = @_;
$self->log_debug("started bar"); ### logs with default class catergory "MyApp"
$self->log_info('bar'); ### logs an info message
$self->log('AlsoPossible')->fatal("croak"); ### log
}
DESCRIPTION
The Easy logging role based on the MooseX::Log::Log4perl logging role for Moose directly adds the logmethods for all available levels to
your class instance. Hence it is possible to use
$self->log_info("blabla");
without having to access a separate log attribute as in MooseX::Log::Log4perl;
In case your app grows and you need more of the super-cow powers of Log4perl or simply don't want the additional methods to clutter up your
class you can simply replace all code "$self->log_LEVEL" with "$self->log->LEVEL".
You can use the following regex substitution to accomplish that:
s/log(_(trace|debug|info|warn|error|fatal))/log->$2/g
ACCESSORS
logger
See MooseX::Log::Log4perl
log
See MooseX::Log::Log4perl
log_fatal ($msg)
Logs a fatal message $msg using the logger attribute. Same as calling
$self->logger->fatal($msg)
log_error ($msg)
Logs an error message using the logger attribute. Same as calling
$self->logger->error($msg)
log_warn ($msg)
Logs a warn message using the logger attribute. Same as calling
$self->logger->warn($msg)
log_info ($msg)
Logs an info message using the logger attribute. Same as calling
$self->logger->info($msg)
log_debug ($msg)
Logs a debug message using the logger attribute. Same as calling
$self->logger->debug($msg)
log_trace ($msg)
Logs a trace message using the logger attribute. Same as calling
$self->logger->trace($msg)
SEE ALSO
MooseX::Log::Log4perl, Log::Log4perl, Moose
BUGS AND LIMITATIONS
Please report any bugs or feature requests to "bug-moosex-log4perl@rt.cpan.org", or through the web interface at <http://rt.cpan.org>.
Or come bother us in "#moose" on "irc.perl.org".
AUTHOR
Roland Lammel "<lammel@cpan.org>"
Inspired by suggestions by Michael Schilli "<m@perlmeister.com>"
Contributions from Tim Bunce "<TIMB@cpan.org>"
LICENSE AND COPYRIGHT
Copyright (c) 2008-2012, Roland Lammel "<lammel@cpan.org>", http://www.quikit.at
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
perl v5.14.2 2012-06-27 Easy(3pm)