the Slf4r::LoggerFacade should have the same API as the ruby logger (I am not absolutely sure) so I could have wrote in my message
DataMapper.logger = Logger.new(STDOUT) but just copied and paste a line from my code instead ;-) maybe the API is not 100% compatible but I never ran into problems on that API part with datamapper. as you say from the practical point of view it works ;-) - Kristian On Oct 20, 8:16 pm, Rhett Sutphin <[email protected]> wrote: > Hi Kristian, > > On Oct 19, 2011, at 9:53 PM, kristian wrote: > > > > > DataMapper.logger = Slf4r::LoggerFacade.new(DataMapper) > > > is how I replace the datamapper logger with the Slf4r facade. > > Thanks for the suggestion. Doesn't this require that the SLF4R facade have > the same methods as DataMapper::Logger? AFAICT, SLF4R doesn't have the bang > methods that DataMapper::Logger does. Perhaps that doesn't matter practically. > > Thanks again, > Rhett > > > > > > > > > > > -Kristian > > > On Oct 20, 12:38 am, Rhett Sutphin <[email protected]> wrote: > >> Hi, > > >> I'd like to have my DataMapper-based system log to a file with a custom > >> format (specifically, I'd like to include the clock time on each log > >> message) and do daily log rotation. The built-in logger in Ruby can do > >> these two things, but DataMapper::Logger can't, AFAICT. I've looked for a > >> way to substitute the built-in logger for DataMapper's, but that doesn't > >> seem to be possible. Googling has given me no suggestions. Any ideas? > > >> Thanks, > >> Rhett > > > -- > > You received this message because you are subscribed to the Google Groups > > "DataMapper" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/datamapper?hl=en. -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.
