log_api_helper
#eBALogAPIHelper
The eBALogAPIHelper dll i is located in the "Common" folder under the eBA installation directory. This is the dll used to print the log record to the system.
The eBALogAPIHelper DLL i consists of the following namespace. All the classes that this namespace contains, the methods and properties of the classes are discussed in detail in this document.
eBALogAPIHelper ''>``````>``````>``````>
''' eBALogAPIHelper.Helper
##1 eBALogAPIHelper.Helper
Contains the classes and value lists required to print the log as a result of an operation performed with code. It contains the following list of classes and values;
eBALogAPIHelper.Helper
public class eBALogAPI
public class eBALogAttachment
public class eBALogFileInfo
public class eBALogItem
public enum eBALogType
##1.1 eBALogAPI
The basic logging class is.
Methods
public void AddLogAsync(eBALogAPIHelper.Helper.eBALogItem logInfo)
Adds asynchronous log to the system with the "logInfo" parameter
public void AddLogAsync(eBALogAPIHelper.Helper.eBALogItem logInfo, int debuglevel)
Adds asynchronous log to the system with "logInfo" and "debuglevel" parameters
public void AddLogAsync(string logText)
Adds asynchronous log to the system with the "logText" parameter
public void AddLogAsync(string logText, string logDetailsText)
Adds asynchronous log to the system with "logText" and "logDetailsText" parameters
public void AddLogAsync(string logText, string logDetailsText, eBALogAPIHelper.Helper.eBALogType logType, string userId)
Adds asynchronous log to the system with parameters "logText", "logDetailsText", "logType" and "userId"
public void AddLogAsync(string logText, string logDetailsText, eBALogAPIHelper.Helper.eBALogType logType, string userId, int debuglevel)
Add asynchronous log to the system with "logText", "logDetailsText", "logType", "userId" and "debuglevel" parameters
public void AddLogAsync(string logText, string logDetailsText, eBALogAPIHelper.Helper.eBALogType logType, string userId, System.Exception exception)
Adds asynchronous log to the system with "logText", "logDetailsText", "logType", "userId" and "exception" parameters
public void AddLogAsync(string logText, string logDetailsText, eBALogAPIHelper.Helper.eBALogType logType, string userId, System.Exception exception, int debuglevel)
Adds asynchronous log to the system with parameters "logText", "logDetailsText", "logType", "userId", "exception" and "debuglevel"
public void AddLogAsync(string logText, string logDetailsText, System.Exception exception)
Add asynchronous log to system with "logText", "logDetailsText" and "exception" parameters
public void AddLogSync(eBALogAPIHelper.Helper.eBALogItem logInfo)
Adds synchronous log to the system with "logInfo" and "debuglevel" parameters
public void AddLogSync(string logText)
Adds synchronous log to the system with the "logText" parameter
public void AddLogSync(string logText, string logDetailsText)
Adds synchronous log to the system with "logText" and "logDetailsText" parameters
public void AddLogSync(string logText, string logDetailsText, eBALogAPIHelper.Helper.eBALogType logType, string userId)
Adds synchronous log to the system with "logText", "logDetailsText", "logType" and "userId" parameters
public void AddLogSync(string logText, string logDetailsText, eBALogAPIHelper.Helper.eBALogType logType, string userId, int debuglevel)
Adds synchronous log to the system with parameters "logText", "logDetailsText", "logType", "userId" and "debuglevel"
public void AddLogSync(string logText, string logDetailsText, eBALogAPIHelper.Helper.eBALogType logType, string userId, System.Exception exception)
Adds synchronous log to the system with parameters "logText", "logDetailsText", "logType", "userId" and "exception"
public void AddLogSync(string logText, string logDetailsText, eBALogAPIHelper.Helper.eBALogType logType, string userId, System.Exception exception, int debuglevel)
Adds synchronous log to the system with parameters "logText", "logDetailsText", "logType", "userId", "exception" and "debuglevel"
public void AddLogSync(string logText, string logDetailsText, System.Exception exception)
public void AddLogSync(string logText)
Adds asynchronous log to the system with "logText", "logDetailsText" and "exception" parameters
public eBALogAPIHelper.Helper.eBALogItem CreateLogItem(string logText, string logDetailsText, eBALogAPIHelper.Helper.eBALogType logType, string userId)
Creates a log element of type eBALogItem with parameters "logText", "logDetailsText", "logType", and "userId"
public eBALogAPIHelper.Helper.eBALogItem CreateLogItem(string logText, string logDetailsText, eBALogAPIHelper.Helper.eBALogType logType, string userId, System.Exception exception)
Creates a log element of type eBALogItem with parameters "logText", "logDetailsText", "logType", "userId", and "exception"
public void Dispose()
closes the log object connection and empties the object contents
public eBALogAPI(string applicationName, string instance)
Creates a new object instance from the eBALogAPI class, given the parameter values "applicationName" and "instance"
''public System.Collections.Generic.List<
eBALogAPIHelper.Helper.eBALogFileInfo>
GetFiles(string path) '''
Returns files in the specified path
public string[] GetFolders(string path)
Returns folders in the specified path
public string[] GetLogDays(string application)
A method that keeps log logs as a directory
public byte[] GetLogFile(string path)
A method that holds log files as a byte directory
public byte[] GetLogFileTail(string path, long index)
Log is the file queuing method
''public System.Collections.Generic.List<
eBALogAPIHelper.Helper.eBALogItem>
GetLogs(string application, System.DateTime logDate, int logTime) '''
It is the method that fetches the logs
public void WaitPendingLogs(int timeout)
It is a method that keeps the hung logs waiting for a certain period of time
Features
public string ApplicationName { get; }
The value is the name of the application
public string DefaultLogUser { get; set; }
The default is the log user value
public bool HasPendingLogs { get; }
The value is whether there is a hung log
public string Instance { get; }
The value is Instance
public bool ResumeOnException { get; set; }
Exception is state information to continue
##1.2 eBALogAttachment
The Log Attachment class is a log attachment.
Methods
public eBALogAttachment()
Creates a new object instance from the eBALogAttachment class
Features
public byte[] Content { get; set; }
The content value is
public string Name { get; set; }
The value of the name
##1.3 eBALogFileInfo
The Log file is the information class.
The log file information class.
public eBALogFileInfo()
Creates a new object instance from the eBALogFileInfo class
Features
public string FileName { get; set; }
is the file name value
public string Size { get; set; }
The value is the dimension
##1.4 eBALogItem
The Log element class.
Methods
public void AddAttachment(string name, byte[] content)
A method that adds an attachment with the "name" and "content" parameters
public void AddAttachment(string name, System.IO.Stream stream)
A method that adds additional parameters with the "name" and "stream" parameters
public void AddFileAsAttachment(string filename)
is the method that attaches the specified file as an attachment
public void AddFileAsAttachment(string name, string filename)
A method that attaches an attachment to the file specified by the "name" and "filename" parameters
public void AddTextAsAttachment(string name, string text)
A method that inserts text as an attachment
public eBALogItem()
Creates a new object instance from the eBALogItem class
Features
public string LogDetailsText { get; set; }
The value is the verbose log text
public string LogText { get; set; }
The value is the text of Log
public string UserID { get; set; }
The id value is User
''public System.Collections.Generic.List<
eBALogAPIHelper.Helper.eBALogAttachment>
Attachments '''
eBALogAttachment is a list of attachments of type
public eBALogAPIHelper.Helper.eBALogType LogType
The value is Log Type
1.5
The log type is a list of values that hold values.
Values
Error
Mistake
None
None
Warning
Warning
Example Usage:
Log printing in the flow code section:
%SystemPath%\Common\eBALogAPIHelper.dll
using eBALogAPIHelper.Helper;
namespace logRetention
{
public partial class FlowCode
{
eBALogAPI logApi = new eBALogAPI("SampleProject", "WSHttpBinding", "http://localhost/eBALogService");
public void WriteLog(string caption, string description, Exception ex = null)
{
logApi.AddLogAsync(caption, description, ex == null ? eBALogType.None : eBALogType.Error, "", ex);
}
public void FlowScript1_Execute()
{
WriteLog("Customer SAP", "I_CUSTOMER Entered Loop" , null);
}
}
}