Skip to content

Commit 7916b35

Browse files
committed
* Added override Log object to string function
1 parent 07e2a97 commit 7916b35

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Scripts/Logging/Logger.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ public LogRecord(LogLevel level, string subSystem, string messageFmt, params obj
9090
m_SubSystem = subSystem;
9191
m_Message = string.Format(messageFmt, args);
9292
}
93+
94+
/// <summary>
95+
/// Returns a <see cref="System.String"/> that represents the current <see cref="IBM.Watson.DeveloperCloud.Logging.LogRecord"/>.
96+
/// </summary>
97+
/// <returns>A <see cref="System.String"/> that represents the current <see cref="IBM.Watson.DeveloperCloud.Logging.LogRecord"/>.</returns>
98+
public override string ToString()
99+
{
100+
return string.Format("[{0}][{1}][{2}] {3}", m_TimeStamp.ToString("MM/dd/yyyy HH:mm:ss"), m_SubSystem, m_Level.ToString(), m_Message);
101+
}
93102
};
94103

95104
/// <summary>

0 commit comments

Comments
 (0)