Hi all, I am lost with the logging system. To test and learn how it works I have added the following code inside viewCSR:
sub cmdViewCSR { our ($db, $query, $errno, $errval, $self); ######################################################################## my $log_token = $crypto_layer->getToken ('LOG'); $log_token = $cryptoShell if ( not $log_token ); $log = OpenCA::Log->new (CONFIG => getRequired ('LogConfiguration'), GETTEXT => \&i18nGettext, CACHE => $xml_cache, CRYPTO => $log_token, DEBUG => $DEBUG); $log->setEncoding (getRequired('DEFAULT_CHARSET')); my $hash ; $hash = OpenCA::Log::Message->new (HASHREF => $hash) ; $hash->{LEVEL} = "CRIT" ; $hash->{CLASS} = "OpenCA::DBI" ; $hash->{user_data}->{testing} = 'test logging system'; $log->addMessage ( $hash ); ######################################################################## I am not sure what class should I specify for the key CLASS in the hash. Also, I am not sure if after the addMessage call I have to do something else. Is the code correct?. If it is, where the message is being logged? Thanks, Jorge _______________________________________________ Openca-Users mailing list Openca-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openca-users