NET Logging Library
Warn(String,String) Method
Example 



KellermanSoftware.NetLoggingLibrary Namespace > ConcreteLog Class > Warn Method : Warn(String,String) Method
Log a warning message
Syntax
Public Overloads Function Warn( _
   ByVal message As String, _
   ByVal additionalInfo As String _
) As LogResponse
Dim instance As ConcreteLog
Dim message As String
Dim additionalInfo As String
Dim value As LogResponse
 
value = instance.Warn(message, additionalInfo)
public LogResponse Warn( 
   string message,
   string additionalInfo
)
public:
LogResponse^ Warn( 
   String^ message,
   String^ additionalInfo
) 

Parameters

message
additionalInfo
Example
ConcreteLog logger = new ConcreteLog();
 
//Licensed Mode
//logger.UserName = "User Name From Receipt";
//logger.LicenseKey = "LicenseKey From Receipt";            
 
//Clear all configuration
logger.ResetConfiguration();
 
//Add a new target, you can also define targets in an xml file, app.config, or web.config
FileTarget fileTarget = new FileTarget(Environment.CurrentDirectory + "\\fileLogger.txt");
logger.Config.Targets.Add(fileTarget);
 
string message = "Test Message";
string additionalInfo = "Additional Info";
 
logger.Warn(message, additionalInfo);
Dim logger As New ConcreteLog()
 
'Licensed Mode
'logger.UserName = "User Name From Receipt";
'logger.LicenseKey = "LicenseKey From Receipt";            
 
'Clear all configuration
logger.ResetConfiguration()
 
'Add a new target, you can also define targets in an xml file, app.config, or web.config
Dim fileTarget As New FileTarget(Environment.CurrentDirectory & "\fileLogger.txt")
logger.Config.Targets.Add(fileTarget)
 
Dim message As String = "Test Message"
Dim additionalInfo As String = "Additional Info"
 
logger.Warn(message, additionalInfo)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ConcreteLog Class
ConcreteLog Members
Overload List