From f9f7bde8524e9863b689275691f4b4711e30d0ff Mon Sep 17 00:00:00 2001
From: Micael Karlberg
Date: Wed, 22 Feb 2012 14:16:48 +0100
Subject: [snmp] Add log_to_io function for both manager and agent
Add a log_to_io Audit Trail Log converter function for
both the manager (snmpm) and agent (snmpa).
Also fixed the converter functions in the logger module,
snmp_log, which previously sometimes did not work
properly (re-open an already open log with different
properties).
OTP-9940
---
lib/snmp/doc/src/snmpa.xml | 34 +++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
(limited to 'lib/snmp/doc/src/snmpa.xml')
diff --git a/lib/snmp/doc/src/snmpa.xml b/lib/snmp/doc/src/snmpa.xml
index 27d89ea4e3..9984a10fea 100644
--- a/lib/snmp/doc/src/snmpa.xml
+++ b/lib/snmp/doc/src/snmpa.xml
@@ -4,7 +4,7 @@
- 20042011
+ 20042012
Ericsson AB. All Rights Reserved.
@@ -495,6 +495,7 @@ notification_delivery_info() = #snmpa_notification_delivery_info{}
+ log_to_txt(LogDir)
log_to_txt(LogDir, Mibs)
log_to_txt(LogDir, Mibs, OutFile) -> ok | {error, Reason}
log_to_txt(LogDir, Mibs, OutFile, LogName) -> ok | {error, Reason}
@@ -522,6 +523,37 @@ notification_delivery_info() = #snmpa_notification_delivery_info{}
See snmp:log_to_txt
for more info.
+
+
+
+
+
+ log_to_io(LogDir) -> ok | {error, Reason}
+ log_to_io(LogDir, Mibs) -> ok | {error, Reason}
+ log_to_io(LogDir, Mibs, LogName) -> ok | {error, Reason}
+ log_to_io(LogDir, Mibs, LogName, LogFile) -> ok | {error, Reason}
+ log_to_io(LogDir, Mibs, LogName, LogFile, Start) -> ok | {error, Reason}
+ log_to_io(LogDir, Mibs, LogName, LogFile, Start, Stop) -> ok | {error, Reason}
+ Convert an Audit Trail Log to text format
+
+ LogDir = string()
+ Mibs = [MibName]
+ MibName = string()
+ LogName = string()
+ LogFile = string()
+ Start = Stop = null | datetime() | {local_time,datetime()} | {universal_time,datetime()}
+ Reason = disk_log_open_error() | file_open_error() | term()
+ disk_log_open_error() = {LogName, term()}
+ file_open_error() = {OutFile, term()}
+
+
+ Converts an Audit Trail Log to a readable format and
+ prints it on stdio.
+ LogName defaults to "snmpa_log".
+ LogFile defaults to "snmpa.log".
+ See snmp:log_to_io
+ for more info.
+
--
cgit v1.2.3