Using logging framework in Eiffel Web

11 zobrazení
Preskočiť na prvú neprečítanú správu

Anders Persson

neprečítané,
4. 1. 2020, 2:43:064. 1. 2020
komu: Eiffel Web Framework
Hi

It would be nice if the user of the Eiffel Web Framework could hook into the same logging tool EWF is using. Or rather that we could make it using this https://www.eiffel.org/blog/jocelyn_fiat/lets_talk_about_runtimelogging_library and then by creationg a SCOOP process for it make it accessible.

Would it not be possible by doing a construct like this

class
LOGGER

feature

write_string( s: STRING)
local
sep_s : separate STRING
do
sep_s := s.out
write_to_system_logger (system_logger, sep_s)
end


feature {NONE}

write_to_system_logger (a_sys_log : separate LOG_UTILITY ;s :separate STRING)
do
a_sys_log.write_string (s)
end

system_logger: separate LOG_UTILITY -- LOG_UTILITY just encapsulate the log framework.

once ("PROCESS")
create Result.make
end

end



And the all classes that want to do logging creates a LOGGER object and then calls write_string("My output")


Anders
Odpovedať všetkým
Odpovedať autorovi
Poslať ďalej
0 nových správ