Commit 8a4f649380bbe4beab84d55083a783e4ec7ff4d6

Authored by David RENÉ
1 parent 8f6a4e16

[+] add the hayamiki lib logger. Instanciated at plugin loaded time

hayamiki_lib @ 2c3918d50e3
1   -Subproject commit c7a326a8ee0afc7708905d3508d5e394fcb912f7
  1 +Subproject commit 2c3918d50e39f154076525d5bdf90ccb45264cae
... ...
hayamiki_web_controller.aproj
... ... @@ -609,19 +609,6 @@
609 609 <Compile Include="xlib\web\controllers_web_site.anubis" />
610 610 <Compile Include="xlib\web\cookies.anubis" />
611 611 <Compile Include="xlib\web\counter.anubis" />
612   - <Compile Include="xlib\web\CXM_dojo.anubis" />
613   - <Compile Include="xlib\web\CXM_dropzone.anubis" />
614   - <Compile Include="xlib\web\CXM_generic_form.anubis" />
615   - <Compile Include="xlib\web\CXM_generic_login.anubis" />
616   - <Compile Include="xlib\web\CXM_generic_table.anubis" />
617   - <Compile Include="xlib\web\CXM_https_get.anubis" />
618   - <Compile Include="xlib\web\CXM_http_get.anubis" />
619   - <Compile Include="xlib\web\CXM_mime.anubis" />
620   - <Compile Include="xlib\web\CXM_style_tools.anubis" />
621   - <Compile Include="xlib\web\CXM_web_arg_encode.anubis" />
622   - <Compile Include="xlib\web\CXM_xml_rpc.anubis" />
623   - <Compile Include="xlib\web\CXM_xml_rpc_parser.anubis" />
624   - <Compile Include="xlib\web\CXM_xml_rpc_types.anubis" />
625 612 <Compile Include="xlib\web\fonts\awesome.anubis" />
626 613 <Compile Include="xlib\web\form.anubis" />
627 614 <Compile Include="xlib\web\html_tooltip.anubis" />
... ... @@ -655,7 +642,6 @@
655 642 <Compile Include="xlib\web\making_a_web_site.anubis" />
656 643 <Compile Include="xlib\web\multihost_http_server.anubis" />
657 644 <Compile Include="xlib\web\page_message.anubis" />
658   - <Compile Include="xlib\web\piwik\CXM_piwik.anubis" />
659 645 <Compile Include="xlib\web\plugin\plugin.anubis" />
660 646 <Compile Include="xlib\web\types\controllers_web_site.anubis" />
661 647 <Compile Include="xlib\web\types\making_a_web_site.anubis" />
... ... @@ -946,7 +932,6 @@
946 932 <None Include="xlib\obj\unit_test.aproj.FileListAbsolute.txt" />
947 933 <None Include="xlib\unit_test.aproj" />
948 934 <None Include="xlib\unit_test.ide" />
949   - <None Include="xlib\web\js\cxm_jquery_animate.js" />
950 935 </ItemGroup>
951 936 <ItemGroup>
952 937 <Folder Include="hayamiki_lib" />
... ...
src/app/app_loggers.anubis
... ... @@ -10,13 +10,78 @@
10 10 transmit xlib/net_services_protocols/logger_client.anubis
11 11  
12 12  
13   -public define String debug_log = "Debug".
  13 +public define One
  14 + register_loggers
  15 + (
  16 + LogLevel console_Level,
  17 + LogLevel file_Level
  18 + )=
  19 + register_uid("hayamiki", "hayamiki/", false);
  20 + register_logger("hayamiki", "hayamiki", 8, false, "hayamiki.log", file_Level, console_Level)
  21 +.
  22 +
  23 +public define One
  24 + logNone
  25 + (
  26 + String log_string
  27 + )=
  28 + logNone("hayamiki", "hayamiki", log_string)
  29 +.
  30 +
  31 +public define One
  32 + logCriticalError
  33 + (
  34 + String log_string
  35 + )=
  36 + logCriticalError("hayamiki", "hayamiki", log_string)
  37 +.
14 38  
15 39 public define One
16 40 logError
17 41 (
18   - String logger_name,
19 42 String log_string
20 43 )=
21   - logError("HK", logger_name, log_string)
  44 + logError("hayamiki", "hayamiki", log_string)
  45 +.
  46 +
  47 +public define One
  48 + logWarning
  49 + (
  50 + String log_string
  51 + )=
  52 + logWarning("hayamiki", "hayamiki", log_string)
  53 +.
  54 +
  55 +public define One
  56 + logDebug
  57 + (
  58 + String log_string
  59 + )=
  60 + logDebug("hayamiki", "hayamiki", log_string)
  61 +.
  62 +
  63 +public define One
  64 + logInfo
  65 + (
  66 + String log_string
  67 + )=
  68 + logInfo("hayamiki", "hayamiki", log_string)
  69 +.
  70 +
  71 +public define One
  72 + logTrace
  73 + (
  74 + LogMask log_mask,
  75 + String log_string
  76 + )=
  77 + logTrace("hayamiki", "hayamiki", log_mask, log_string)
  78 +.
  79 +
  80 +public define One
  81 + log
  82 + (
  83 + LogLevel level,
  84 + String log_string
  85 + )=
  86 + log("hayamiki", level, "hayamiki", log_string)
22 87 .
... ...
src/web_controller/database/generated/fs_file.anubis
... ... @@ -446,7 +446,7 @@ public define Maybe(Int)
446 446 bind_String_or_NULL(":v_path", fs_file.path)],
447 447 "update_fs_file (UPDATE)") is {
448 448 error(sql_error) then
449   - logError(debug_log, db_error(sql_error, "update_fs_file")); failure,
  449 + logError(db_error(sql_error, "update_fs_file")); failure,
450 450 ok(_, _, _) then success(idx) }
451 451 }.
452 452  
... ... @@ -458,7 +458,7 @@ public define Maybe(Int)
458 458 )=
459 459 if extract_Fs_file_from_web_arg(lwa, "") is
460 460 {
461   - failure then logError(debug_log, "update_fs_file extract_Fs_file_from_web_arg is failure"); failure,
  461 + failure then logError("update_fs_file extract_Fs_file_from_web_arg is failure"); failure,
462 462 success(fs_file) then update_fs_file(db, fs_file)
463 463 }.
464 464  
... ...
src/web_controller/hayamiki_plugin.anubis
... ... @@ -7,6 +7,7 @@
7 7 */
8 8  
9 9 read tools/basis.anubis
  10 +read app/app_loggers.anubis
10 11 read system/logger.anubis
11 12 read xlib/web/plugin/plugin.anubis
12 13 read xlib/web/types/making_a_web_site.anubis
... ... @@ -31,6 +32,8 @@ define Maybe(HTML_Partial_Content)
31 32 global define WEB_Plugin
32 33 hayamiki_web_plugin_1_19_lib
33 34 =
  35 + println("hayamiki_web_plugin_1_19_lib; entry");
  36 + register_loggers(logTrace, logTrace);
34 37 web_plugin(
35 38 "HAYAMIKI",
36 39 "BASE",
... ...
xlib @ a66ad216efc
1   -Subproject commit 4152ce3abcd199ad4a839b93ba7ddd483b01a4fe
  1 +Subproject commit a66ad216efcbfe28e4f095ffc68d29e2b8f08412
... ...