Skip to content

Commit

Permalink
Update the v4 logging table.
Browse files Browse the repository at this point in the history
  • Loading branch information
SadieCat committed Sep 1, 2023
1 parent 148b1f0 commit fb938a1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
21 changes: 13 additions & 8 deletions docs/4/configuration/_log.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ details: |+
COMMAND | debug | Messages relating to command execution.
CONFIG | warning<br>normal<br>debug | Messages relating to the configuration.
CONNECTCLASS | normal<br>debug | Messages relating to [connect classes](#connect).
CULLLIST | debug | Messages relating to object cull lists.
CULL | debug | Messages relating to object culling.
LOG | critical<br>normal | Messages relating to logging.
MODE | warning | Messages relating to modes.
MODULE | critical<br>normal<br>debug | Messages relating to modules.
SERVICE | debug | Messages relating to service registration.
SIGNAL | debug | Messages relating to signal handling.
SOCKET | warning<br>normal<br>debug | Messages relating to network sockets.
STARTUP | critical<br>warning<br>normal | Messages relating to the startup process.
USERINPUT | rawio | Messages relating to user input.
Expand All @@ -72,12 +73,13 @@ details: |+
core_oper | critical<br>normal | Messages relating to server operators.
core_reloadmodule | debug | Messages relating to the RELOADMODULE command.
core_who | debug | Messages relating to the WHO command.
core_whowas | normal | Messages relating to the WHOWAS command.
m_argon2 | warning | Messages relating to [the argon2 module](/4/modules/argon2).
core_whowas | debug | Messages relating to the WHOWAS command.
m_callerid | debug | Messages relating to [the callerid module](/4/modules/callerid).
m_cap | debug | Messages relating to [the cap module](/4/modules/cap).
m_chanlog | normal | Messages relating to [the chanlog module](/4/modules/chanlog).
m_cloaking | normal | Messages relating to [the cloaking module](/4/modules/cloaking).
m_cloak | debug | Messages relating to [the cloak module](/4/modules/cloak).
m_cloak_sha256 | normal | Messages relating to [the cloak_sha256 module](/4/modules/cloak_sha256).
m_cloak_user | debug | Messages relating to [the cloak_user module](/4/modules/cloak_user).
m_codepage | debug | Messages relating to [the codepage module](/4/modules/codepage).
m_connectban | debug | Messages relating to [the connectban module](/4/modules/connectban).
m_customprefix | debug | Messages relating to [the customprefix module](/4/modules/customprefix).
Expand All @@ -87,26 +89,29 @@ details: |+
m_dnsbl | debug | Messages relating to [the dnsbl module](/4/modules/dnsbl).
m_filter | warning<br>normal<br>debug | Messages relating to [the filter module](/4/modules/filter).
m_gateway | normal<br>debug | Messages relating to [the gateway module](/4/modules/gateway).
m_geo_maxmind | debug | Messages relating to [the geo_maxmind module](/4/modules/geo_maxmind).
m_geo_maxmind | normal<br>debug | Messages relating to [the geo_maxmind module](/4/modules/geo_maxmind).
m_hidemode | debug | Messages relating to [the hidemode module](/4/modules/hidemode).
m_httpd | debug | Messages relating to [the httpd module](/4/modules/httpd).
m_httpd_acl | debug | Messages relating to [the httpd_acl module](/4/modules/httpd_acl).
m_httpd_config | debug | Messages relating to [the httpd_config module](/4/modules/httpd_config).
m_httpd_stats | debug | Messages relating to [the httpd_stats module](/4/modules/httpd_stats).
m_ident | debug | Messages relating to [the ident module](/4/modules/ident).
m_ircv3_sts | debug | Messages relating to [the ircv3_sts module](/4/modules/ircv3_sts).
m_ldap | normal | Messages relating to [the ldap module](/4/modules/ldap).
m_ldapauth | debug | Messages relating to [the ldapauth module](/4/modules/ldapauth).
m_mysql | critical<br>debug | Messages relating to [the mysql module](/4/modules/mysql).
m_log_json | normal | Messages relating to [the log_json module](/4/modules/log_json).
m_mysql | critical<br>normal<br>debug | Messages relating to [the mysql module](/4/modules/mysql).
m_operlog | normal | Messages relating to [the operlog module](/4/modules/operlog).
m_opermotd | normal | Messages relating to [the opermotd module](/4/modules/opermotd).
m_password_hash | normal | Messages relating to [the password_hash module](/4/modules/password_hash).
m_permchannels | critical<br>warning<br>debug | Messages relating to [the permchannels module](/4/modules/permchannels).
m_pgsql | critical<br>debug | Messages relating to [the pgsql module](/4/modules/pgsql).
m_pgsql | critical<br>normal<br>debug | Messages relating to [the pgsql module](/4/modules/pgsql).
m_regex_pcre | normal | Messages relating to [the regex_pcre module](/4/modules/regex_pcre).
m_sasl | normal<br>debug | Messages relating to [the sasl module](/4/modules/sasl).
m_showfile | warning | Messages relating to [the showfile module](/4/modules/showfile).
m_silence | debug | Messages relating to [the silence module](/4/modules/silence).
m_spanningtree | warning<br>normal<br>debug<br>rawio | Messages relating to [the spanningtree module](/4/modules/spanningtree).
m_sqlite3 | critical<br>debug | Messages relating to [the sqlite3 module](/4/modules/sqlite3).
m_sqlite3 | critical<br>normal<br>debug | Messages relating to [the sqlite3 module](/4/modules/sqlite3).
m_sqloper | warning<br>debug | Messages relating to [the sqloper module](/4/modules/sqloper).
m_ssl_gnutls | warning<br>normal<br>debug | Messages relating to [the ssl_gnutls module](/4/modules/ssl_gnutls).
m_ssl_mbedtls | warning<br>normal<br>debug | Messages relating to [the ssl_mbedtls module](/4/modules/ssl_mbedtls).
Expand Down
4 changes: 2 additions & 2 deletions tools/extract-log-types
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Find.find(ARGV[0]) do |path|

contents = File.read(path)
v3calls = contents.scan(/\bLog\(("[^"]+"|MODNAME),\s+LOG_([A-Z]+),/).map { |type, level| { type: type, level: level }}
v4calls = contents.scan(/\b(RawIO|Debug|Normal|Warning|Error)\(("[^"]+"|MODNAME),/).map { |level, type| { level: level, type: type }}
v4calls = contents.scan(/\b(RawIO|Debug|Normal|Warning|Critical)\(("[^"]+"|MODNAME),/).map { |level, type| { level: level, type: type }}
(v3calls + v4calls).each do |log|
if log[:type] == 'MODNAME'
if path =~ /\/((?:m|core)_[a-z0-9_]+)(?:\.cpp|\/)?/
Expand All @@ -41,7 +41,7 @@ end

longest_type = types.keys.max_by(&:length).length
longest_level = types.values.map { |t| t.sum(&:length) + ((t.size - 1) * 4) }.max
levelorder = %w(sparse error warning default normal verbose debug rawio)
levelorder = %w(sparse critical warning default normal verbose debug rawio)
types.sort.each do |type, levels|
type_padding = longest_type - type.length
levelstr = levels.to_a.sort_by { |obj| levelorder.index obj }.join('<br>')
Expand Down

0 comments on commit fb938a1

Please sign in to comment.