Skip to Content.
Sympa Menu

devel - [sympa-developpers] Log functions

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: IKEDA Soji <address@concealed>
  • To: address@concealed
  • Subject: [sympa-developpers] Log functions
  • Date: Mon, 5 Aug 2013 23:41:27 +0900

Hi,

There are some points I realized about Log functions: one notice and
three questions.

- About parameters for do_log().

Notice: do_log() and so on use sprintf() internally. So in
general interpolation may cause unexpected result.

Sympa::Log::do_log('err', "Could not open $file");

should be:

Sympa::Log::do_log('err', 'Could not open %s', $file);

- Unimplemented 'warn' level.

Developers' Howto
http://www.sympa.org/dev/contributors/developers_howto
tells about 'warn' log level. It is not implemented.

I suppose 'warn' level might be useful for users, however,
what is difference from 'err' level (especially from users' view)?

- fatal_err() vs. croak().

fatal_err() seems to be replaced by croak() in most cases.
Former requires Sympa module, while latter needs just a standard
Carp module.

What are pros to use fatal_err()?

- Three types of logging.

Sympa::Log::Syslog::do_log(), Sympa::Log::Database::do_log() and
wwsympa::web_db_log() are co-exist and they are not always used
all at once.

Are separate logging functions needed for each logging store?

Regards,

--- Soji

--
株式会社 コンバージョン セキュリティ&OSSソリューション部 池田荘児
〒231-0004 神奈川県横浜市中区元浜町3-21-2 ヘリオス関内ビル7F
e-mail address@concealed TEL 045-640-3550
http://www.conversion.co.jp/




Archive powered by MHonArc 2.6.19+.

Top of Page