From: "NAKAMURA, Hiroshi" Date: 2005-10-15T17:20:50+09:00 Subject: Re: Ruby 1.8.3 breaks Needle's logger? -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Jamis Buck wrote: >> What is the concept 'private API' here? In general library >> development, there are 2 APIs for users and developers. For users it >> can be called 'public API' as you wrote. Is 'private API' you wrote >> an API for developers who extend a class for implementation inheritance? > > By 'private', I meant 'hidden via the private method'. Thus, it was Thank you for the explanation. I felt words 'interface' and 'private' are conflicting. Maybe I'm wrong. > obvious the method(s) being altered were not meant for public (or even > programmer) consumption, but given that there was no other way to > modify the line format used by the logger than to override the > method... well, some of us overrode it. And the signature changed. Yes. There was no way to change the format other than breaking in the implementation. > to refactor and alter that private method. I just hope (haven't checked > yet) that 1.8.3 makes it easier to customize the log format so that > moving forward we don't have to mess with Logger's internals. You may change the overall format with Logger#formatter= method now. logger.formatter = proc { |severity, datetime, progname, msg| "#{datetime}: #{msg}\n" } # e.g. "Thu Sep 22 08:51:08 GMT+9:00 2005: hello world" Regards, // NaHi -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Cygwin) iD8DBQFDULu7f6b33ts2dPkRAgTSAJ99sMKYkdDQQeamsKjUdCC6myctYACfTOHS KurWE1aTiPIZlhmF8eA0H2Y= =FAvr -----END PGP SIGNATURE-----