diff --git a/hayamiki_lib b/hayamiki_lib index c7a326a..2c3918d 160000 --- a/hayamiki_lib +++ b/hayamiki_lib @@ -1 +1 @@ -Subproject commit c7a326a8ee0afc7708905d3508d5e394fcb912f7 +Subproject commit 2c3918d50e39f154076525d5bdf90ccb45264cae diff --git a/hayamiki_web_controller.aproj b/hayamiki_web_controller.aproj index 5ee4ce1..fa98875 100644 --- a/hayamiki_web_controller.aproj +++ b/hayamiki_web_controller.aproj @@ -609,19 +609,6 @@ - - - - - - - - - - - - - @@ -655,7 +642,6 @@ - @@ -946,7 +932,6 @@ - diff --git a/src/app/app_loggers.anubis b/src/app/app_loggers.anubis index 33dc85f..6643d64 100644 --- a/src/app/app_loggers.anubis +++ b/src/app/app_loggers.anubis @@ -10,13 +10,78 @@ transmit xlib/net_services_protocols/logger_client.anubis -public define String debug_log = "Debug". +public define One + register_loggers + ( + LogLevel console_Level, + LogLevel file_Level + )= + register_uid("hayamiki", "hayamiki/", false); + register_logger("hayamiki", "hayamiki", 8, false, "hayamiki.log", file_Level, console_Level) +. + +public define One + logNone + ( + String log_string + )= + logNone("hayamiki", "hayamiki", log_string) +. + +public define One + logCriticalError + ( + String log_string + )= + logCriticalError("hayamiki", "hayamiki", log_string) +. public define One logError ( - String logger_name, String log_string )= - logError("HK", logger_name, log_string) + logError("hayamiki", "hayamiki", log_string) +. + +public define One + logWarning + ( + String log_string + )= + logWarning("hayamiki", "hayamiki", log_string) +. + +public define One + logDebug + ( + String log_string + )= + logDebug("hayamiki", "hayamiki", log_string) +. + +public define One + logInfo + ( + String log_string + )= + logInfo("hayamiki", "hayamiki", log_string) +. + +public define One + logTrace + ( + LogMask log_mask, + String log_string + )= + logTrace("hayamiki", "hayamiki", log_mask, log_string) +. + +public define One + log + ( + LogLevel level, + String log_string + )= + log("hayamiki", level, "hayamiki", log_string) . diff --git a/src/web_controller/database/generated/fs_file.anubis b/src/web_controller/database/generated/fs_file.anubis index 9f97a7d..b4ac980 100644 --- a/src/web_controller/database/generated/fs_file.anubis +++ b/src/web_controller/database/generated/fs_file.anubis @@ -446,7 +446,7 @@ public define Maybe(Int) bind_String_or_NULL(":v_path", fs_file.path)], "update_fs_file (UPDATE)") is { error(sql_error) then - logError(debug_log, db_error(sql_error, "update_fs_file")); failure, + logError(db_error(sql_error, "update_fs_file")); failure, ok(_, _, _) then success(idx) } }. @@ -458,7 +458,7 @@ public define Maybe(Int) )= if extract_Fs_file_from_web_arg(lwa, "") is { - failure then logError(debug_log, "update_fs_file extract_Fs_file_from_web_arg is failure"); failure, + failure then logError("update_fs_file extract_Fs_file_from_web_arg is failure"); failure, success(fs_file) then update_fs_file(db, fs_file) }. diff --git a/src/web_controller/hayamiki_plugin.anubis b/src/web_controller/hayamiki_plugin.anubis index 8df94a1..89d38f8 100644 --- a/src/web_controller/hayamiki_plugin.anubis +++ b/src/web_controller/hayamiki_plugin.anubis @@ -7,6 +7,7 @@ */ read tools/basis.anubis +read app/app_loggers.anubis read system/logger.anubis read xlib/web/plugin/plugin.anubis read xlib/web/types/making_a_web_site.anubis @@ -31,6 +32,8 @@ define Maybe(HTML_Partial_Content) global define WEB_Plugin hayamiki_web_plugin_1_19_lib = + println("hayamiki_web_plugin_1_19_lib; entry"); + register_loggers(logTrace, logTrace); web_plugin( "HAYAMIKI", "BASE", diff --git a/xlib b/xlib index 4152ce3..a66ad21 160000 --- a/xlib +++ b/xlib @@ -1 +1 @@ -Subproject commit 4152ce3abcd199ad4a839b93ba7ddd483b01a4fe +Subproject commit a66ad216efcbfe28e4f095ffc68d29e2b8f08412 -- libgit2 0.21.4