#.mudpy.limit.backups: 10
.mudpy.limit.password_tries: 3
-internal:logging:
- #file: mudpy.log
- max_log_lines: 1000
- stdout: yes
- #syslog: mudpy
+#.mudpy.log.file: mudpy.log
+.mudpy.log.lines: 1000
+.mudpy.log.stdout: true
+#.mudpy.log.syslog: mudpy
internal:network:
host: ::1
"""Log a message."""
# a couple references we need
- file_name = universe.categories["internal"]["logging"].get("file")
- max_log_lines = universe.categories["internal"]["logging"].get(
- "max_log_lines"
- )
- syslog_name = universe.categories["internal"]["logging"].get("syslog")
+ file_name = universe.contents["mudpy.log"].get("file")
+ max_log_lines = universe.contents["mudpy.log"].get("lines")
+ syslog_name = universe.contents["mudpy.log"].get("syslog")
timestamp = time.asctime()[4:19]
# turn the message into a list of nonempty lines
file_descriptor.close()
# send the timestamp and line to standard output
- if universe.categories["internal"]["logging"].get("stdout"):
+ if universe.contents["mudpy.log"].get("stdout"):
for line in lines:
print(timestamp + " " + line)