diff --git a/lib/loggerpro/LoggerPro.ConsoleAppender.pas b/lib/loggerpro/LoggerPro.ConsoleAppender.pas index 1fc45edd..a6dee6f9 100644 --- a/lib/loggerpro/LoggerPro.ConsoleAppender.pas +++ b/lib/loggerpro/LoggerPro.ConsoleAppender.pas @@ -65,6 +65,12 @@ TLoggerProConsoleAppender = class(TLoggerProAppenderBase) procedure WriteLog(const aLogItem: TLogItem); override; end; + TLoggerProConsoleLogFmtAppender = class(TLoggerProConsoleAppender) + public + constructor Create(ALogItemRenderer: ILogItemRenderer = nil); override; + function FormatLog(const ALogItem: TLogItem): string; override; + end; + // for some reason, AttachConsole has been left out of Winapi.windows.pas function AttachConsole(PID: Cardinal): LongBool; stdcall; @@ -74,7 +80,8 @@ implementation uses Winapi.Windows, - Winapi.Messages; + Winapi.Messages, + LoggerPro.Renderers; // for some reason, AttachConsole has been left out of Winapi.windows.pas const @@ -186,4 +193,23 @@ procedure TLoggerProConsoleAppender.WriteLog(const aLogItem: TLogItem); end; end; +{ TLoggerProConsoleLogFmtAppender } + +constructor TLoggerProConsoleLogFmtAppender.Create(ALogItemRenderer: ILogItemRenderer); +begin + inherited Create(TLogItemRendererLogFmt.Create); +end; + +function TLoggerProConsoleLogFmtAppender.FormatLog(const ALogItem: TLogItem): string; +begin + if Assigned(FOnLogRow) then + begin + FOnLogRow(ALogItem, Result); + end + else + begin + Result := FLogItemRenderer.RenderLogItem(ALogItem); + end; +end; + end. diff --git a/lib/loggerpro/LoggerPro.FileAppender.pas b/lib/loggerpro/LoggerPro.FileAppender.pas index 5de039d1..adc2ff2f 100644 --- a/lib/loggerpro/LoggerPro.FileAppender.pas +++ b/lib/loggerpro/LoggerPro.FileAppender.pas @@ -188,6 +188,17 @@ TLoggerProFileByFolderAppender = class(TLoggerProFileAppender) procedure TearDown; override; end; + TLoggerProLogFmtFileAppender = class(TLoggerProSimpleFileAppender) + protected + function GetLogFileName(const aTag: string; const aFileNumber: Integer): string; override; + procedure EmitStartRotateLogItem(aWriter: TStreamWriter); override; + procedure EmitEndRotateLogItem(aWriter: TStreamWriter); override; + public + constructor Create(aMaxBackupFileCount: Integer = TLoggerProFileAppender.DEFAULT_MAX_BACKUP_FILE_COUNT; + aMaxFileSizeInKiloByte: Integer = TLoggerProFileAppender.DEFAULT_MAX_FILE_SIZE_KB; aLogsFolder: string = ''; + aLogFileNameFormat: string = TLoggerProSimpleFileAppender.DEFAULT_FILENAME_FORMAT; aEncoding: TEncoding = nil); + reintroduce; + end; implementation @@ -196,8 +207,9 @@ implementation System.StrUtils, System.Math, System.DateUtils, + LoggerPro.Renderers, idGlobal -{$IF Defined(Android), System.SysUtils} +{$IF Defined(Android)} ,Androidapi.Helpers ,Androidapi.JNI.GraphicsContentViewText ,Androidapi.JNI.JavaTypes @@ -702,5 +714,42 @@ procedure TLoggerProFileByFolderAppender.WriteLog(const ALogItem: TLogItem); end; end; +{ TLoggerProLogFmtFileAppender } + +constructor TLoggerProLogFmtFileAppender.Create(aMaxBackupFileCount, aMaxFileSizeInKiloByte: Integer; aLogsFolder, + aLogFileNameFormat: string; aEncoding: TEncoding); +begin + inherited Create( + aMaxBackupFileCount, + aMaxFileSizeInKiloByte, + aLogsFolder, + aLogFileNameFormat, + TLogItemRendererLogFmt.Create, + aEncoding); +end; + +procedure TLoggerProLogFmtFileAppender.EmitEndRotateLogItem(aWriter: TStreamWriter); +begin + // do nothing +end; + +procedure TLoggerProLogFmtFileAppender.EmitStartRotateLogItem(aWriter: TStreamWriter); +begin + // do nothing +end; + +function TLoggerProLogFmtFileAppender.GetLogFileName(const aTag: string; const aFileNumber: Integer): string; +var + lOrigFName, lOrigExt: string; +begin + lOrigFName := inherited; + lOrigExt := TPath.GetExtension(lOrigFName); + if lOrigExt.IsEmpty then + begin + lOrigExt := '.log'; + end; + Result := TPath.ChangeExtension(lOrigFName, '.logfmt' + lOrigExt); +end; + end. diff --git a/lib/loggerpro/LoggerPro.Renderers.pas b/lib/loggerpro/LoggerPro.Renderers.pas index 207757a5..f9868a93 100644 --- a/lib/loggerpro/LoggerPro.Renderers.pas +++ b/lib/loggerpro/LoggerPro.Renderers.pas @@ -63,6 +63,16 @@ TLogItemRendererNoTagNoThreadID = class(TLogItemRendererDefault) function RenderLogItem(const aLogItem: TLogItem): String; override; end; + TLogItemRendererLogFmt = class(TLogItemRenderer) + private + fFormatSettings: TFormatSettings; + protected + // ILogLayoutRenderer + procedure Setup; override; + procedure TearDown; override; + function RenderLogItem(const aLogItem: TLogItem): String; override; + end; + function GetDefaultLogItemRenderer: ILogItemRenderer; @@ -71,6 +81,9 @@ function GetDefaultLogItemRenderer: ILogItemRenderer; implementation +uses + System.DateUtils; + function GetDefaultLogItemRenderer: ILogItemRenderer; begin Result := gDefaultLogItemRenderer.Create; @@ -161,5 +174,32 @@ function TLogItemRendererNoTagNoThreadID.RenderLogItem(const aLogItem: TLogItem) +{ TLogItemRendererLogFmt } + +function TLogItemRendererLogFmt.RenderLogItem(const aLogItem: TLogItem): String; +begin + Result := + Format('time=%s threadid=%d type=%s msg=%s tag=%s', + [ + DateToISO8601(ALogItem.TimeStamp, False), + ALogItem.ThreadID, + ALogItem.LogTypeAsString, + ALogItem.LogMessage.QuotedString('"'), + ALogItem.LogTag + ]); +end; + +procedure TLogItemRendererLogFmt.Setup; +begin + inherited; + fFormatSettings := GetDefaultFormatSettings; +end; + +procedure TLogItemRendererLogFmt.TearDown; +begin + inherited; + +end; + end. diff --git a/lib/loggerpro/LoggerPro.SimpleConsoleAppender.pas b/lib/loggerpro/LoggerPro.SimpleConsoleAppender.pas index 37638bf2..04629531 100644 --- a/lib/loggerpro/LoggerPro.SimpleConsoleAppender.pas +++ b/lib/loggerpro/LoggerPro.SimpleConsoleAppender.pas @@ -44,18 +44,19 @@ interface } TLoggerProSimpleConsoleAppender = class(TLoggerProAppenderBase) public - procedure Setup; override; procedure TearDown; override; procedure WriteLog(const aLogItem: TLogItem); override; end; -implementation + TLoggerProSimpleConsoleLogFmtAppender = class(TLoggerProSimpleConsoleAppender) + public + constructor Create; override; + end; +implementation -procedure TLoggerProSimpleConsoleAppender.Setup; -begin - inherited; -end; +uses + LoggerPro.Renderers; procedure TLoggerProSimpleConsoleAppender.TearDown; begin @@ -67,4 +68,11 @@ procedure TLoggerProSimpleConsoleAppender.WriteLog(const aLogItem: TLogItem); Writeln(FormatLog(aLogItem)); end; +{ TLoggerProSimpleConsoleLogFmtAppender } + +constructor TLoggerProSimpleConsoleLogFmtAppender.Create; +begin + inherited Create(TLogItemRendererLogFmt.Create); +end; + end. diff --git a/lib/loggerpro/LoggerPro.pas b/lib/loggerpro/LoggerPro.pas index b9198d74..7af0f186 100644 --- a/lib/loggerpro/LoggerPro.pas +++ b/lib/loggerpro/LoggerPro.pas @@ -285,14 +285,15 @@ TLoggerProAppenderBase = class abstract(TInterfacedObject, ILogAppender) FLogLevel: TLogType; FEnabled: Boolean; FLastErrorTimeStamp: TDateTime; - FOnLogRow: TOnAppenderLogRow; - FLogItemRenderer: ILogItemRenderer; FFormatSettings: TFormatSettings; protected + FOnLogRow: TOnAppenderLogRow; + FLogItemRenderer: ILogItemRenderer; property FormatSettings: TFormatSettings read FFormatSettings; property LogItemRenderer: ILogItemRenderer read FLogItemRenderer; public - constructor Create(ALogItemRenderer: ILogItemRenderer = nil); virtual; + constructor Create(ALogItemRenderer: ILogItemRenderer); overload; virtual; + constructor Create; overload; virtual; procedure Setup; virtual; function FormatLog(const ALogItem: TLogItem): string; virtual; procedure WriteLog(const aLogItem: TLogItem); virtual; abstract; @@ -887,6 +888,11 @@ constructor TLoggerProAppenderBase.Create(aLogItemRenderer: ILogItemRenderer); Self.FOnLogRow := nil; end; +constructor TLoggerProAppenderBase.Create; +begin + Create(nil); +end; + function TLoggerProAppenderBase.FormatLog(const ALogItem: TLogItem): string; begin if Assigned(FOnLogRow) then diff --git a/lib/loggerpro/samples/06_logfmt_appender/LoggerProConfig.pas b/lib/loggerpro/samples/06_logfmt_appender/LoggerProConfig.pas new file mode 100644 index 00000000..e4cf9ba5 --- /dev/null +++ b/lib/loggerpro/samples/06_logfmt_appender/LoggerProConfig.pas @@ -0,0 +1,37 @@ +unit LoggerProConfig; + +interface + +uses + LoggerPro, LoggerPro.Renderers; + +function Log: ILogWriter; + +implementation + +uses + LoggerPro.ConsoleAppender, + LoggerPro.FileAppender, + Winapi.Windows; + +var + _Log: ILogWriter; + +function Log: ILogWriter; +begin + Result := _Log; +end; + +initialization + + + +LoggerPro.Renderers.gDefaultLogItemRenderer := TLogItemRendererNoTag; //optional + +_Log := BuildLogWriter([ + TLoggerProConsoleLogFmtAppender.Create, + TLoggerProLogFmtFileAppender.Create]); +if not IsConsole then + AllocConsole; + +end. diff --git a/lib/loggerpro/samples/06_logfmt_appender/logfmt_appender.dpr b/lib/loggerpro/samples/06_logfmt_appender/logfmt_appender.dpr new file mode 100644 index 00000000..92660b35 --- /dev/null +++ b/lib/loggerpro/samples/06_logfmt_appender/logfmt_appender.dpr @@ -0,0 +1,16 @@ +program logfmt_appender; + +uses + Vcl.Forms, + LoggerProConfig in 'LoggerProConfig.pas', + MainFormU in '..\common\MainFormU.pas' {MainForm}; + +{$R *.res} + +begin + ReportMemoryLeaksOnShutdown := True; + Application.Initialize; + Application.MainFormOnTaskbar := True; + Application.CreateForm(TMainForm, MainForm); + Application.Run; +end. diff --git a/lib/loggerpro/samples/06_logfmt_appender/logfmt_appender.dproj b/lib/loggerpro/samples/06_logfmt_appender/logfmt_appender.dproj new file mode 100644 index 00000000..ac4cd928 --- /dev/null +++ b/lib/loggerpro/samples/06_logfmt_appender/logfmt_appender.dproj @@ -0,0 +1,1098 @@ + + + {314E1C0F-EC4A-4AE9-AFB1-C0ABE60886D3} + 20.2 + VCL + logfmt_appender.dpr + True + Debug + Win32 + 1 + Application + logfmt_appender + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) + logfmt_appender + $(BDS)\bin\delphi_PROJECTICON.ico + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + false + false + false + false + false + + + CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName) + ..\..\;$(DCC_UnitSearchPath) + DBXSqliteDriver;DBXDb2Driver;dxCoreRS23;vclactnband;frxe23;vclFireDAC;dxPSLnksRS23;dxPSdxLCLnkRS23;tethering;cxDataRS23;dxPSdxOCLnkRS23;dxTabbedMDIRS23;FireDACADSDriver;dxSkinBlackRS23;dxSkinLondonLiquidSkyRS23;JvPluginSystem;dxDBXServerModeRS23;dxHttpIndyRequestRS23;dxPScxGridLnkRS23;cxSchedulerRS23;FireDACMSSQLDriver;dclRBDBE1723;vcltouch;JvBands;vcldb;rbDB1723;svn;dxWizardControlRS23;dxSkinMcSkinRS23;dxPScxCommonRS23;JvJans;Intraweb;dxSkinOffice2007BlueRS23;rbIBE1723;dxBarRS23;cxSchedulerRibbonStyleEventEditorRS23;dxSkinOffice2013WhiteRS23;JvDotNetCtrls;dxPSTeeChartRS23;cxLibraryRS23;dxSkinVisualStudio2013LightRS23;vclib;cxPivotGridChartRS23;rbDBE1723;dxSkinSummer2008RS23;dxPSdxDBOCLnkRS23;dxGDIPlusRS23;dxSkinDarkSideRS23;FireDACDBXDriver;dxSkinFoggyRS23;dxSkinSevenRS23;vclx;rbCIDE1723;dxSkinOffice2010SilverRS23;dxdborRS23;RESTBackendComponents;dxLayoutControlRS23;dxPSPrVwRibbonRS23;VCLRESTComponents;dxSkinDevExpressStyleRS23;dxSkinWhiteprintRS23;vclie;bindengine;CloudService;rbRAP1723;JvHMI;FireDACMySQLDriver;dxSkinOffice2013DarkGrayRS23;DataSnapClient;dxPScxPCProdRS23;bindcompdbx;DBXSybaseASEDriver;IndyIPServer;dxSkinPumpkinRS23;IndySystem;dsnapcon;cxTreeListdxBarPopupMenuRS23;dclRBIBE1723;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;dxSkinLilianRS23;Jcl;rbADO1723;dxBarDBNavRS23;dxFlowChartRS23;dxSkinOffice2016ColorfulRS23;rbUSER1723;DBXOdbcDriver;FireDACTDataDriver;FMXTee;ipstudiowinclient;soaprtl;DbxCommonDriver;dxSpreadSheetRS23;AsyncProDR;JvManagedThreads;dxSkinOffice2007PinkRS23;dxPSdxSpreadSheetLnkRS23;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;DTKANPRPackage;dxSkinHighContrastRS23;rtl;dxSkinSevenClassicRS23;DbxClientDriver;dxSkinDevExpressDarkStyleRS23;DBXSybaseASADriver;dxNavBarRS23;dxSkinMetropolisDarkRS23;CodeSiteExpressPkg;dxSkinTheAsphaltWorldRS23;JvSystem;SampleListViewMultiDetailAppearancePackage;dxRichEditControlRS23;JvStdCtrls;JvTimeFramework;ipstudiowin;appanalytics;cxPivotGridRS23;rbUSERDesign1723;dxSkinsdxDLPainterRS23;IndyIPClient;dxRibbonRS23;dxPScxVGridLnkRS23;bindcompvcl;frxDB23;vcldbx;dxSkinOffice2007SilverRS23;dxPScxTLLnkRS23;dxMapControlRS23;TeeUI;rbDIDE1723;JvPascalInterpreter;JvDocking;VclSmp;dxPScxSchedulerLnkRS23;cxTreeListRS23;FireDACODBCDriver;JclVcl;DataSnapIndy10ServerTransport;dxRibbonCustomizationFormRS23;dxPSRichEditControlLnkRS23;dxBarExtDBItemsRS23;DataSnapProviderClient;FireDACMongoDBDriver;dxSkiniMaginaryRS23;frx23;dxSpellCheckerRS23;JvControls;dxSkinsdxBarPainterRS23;JvPrintPreview;dxSkinCoffeeRS23;DataSnapServerMidas;RESTComponents;DBXInterBaseDriver;rbRTL1723;dxADOServerModeRS23;emsclientfiredac;DataSnapFireDAC;svnui;dxmdsRS23;dxSkinLiquidSkyRS23;dxdbtrRS23;dxSkinSpringTimeRS23;dxPSDBTeeChartRS23;JvGlobus;HOAsysR;dxSkinscxPCPainterRS23;dxPSCoreRS23;DBXMSSQLDriver;JvMM;dxSkinXmas2008BlueRS23;rbDAD1723;DatasnapConnectorsFreePascal;bindcompfmx;JvNet;DBXOracleDriver;dxSkinSilverRS23;dxSkinValentineRS23;inetdb;JvAppFrm;ipstudiowinwordxp;rbTC1723;FmxTeeUI;dxBarExtItemsRS23;FireDACIBDriver;fmx;fmxdae;DelphiCookbookListViewAppearance;dxServerModeRS23;dxPsPrVwAdvRS23;dxSkinOffice2010BlackRS23;JvWizards;cxPageControlRS23;dxSkinStardustRS23;cxSchedulerGridRS23;dbexpress;IndyCore;dxSkinSharpPlusRS23;UIBD21Win32R;JvPageComps;dsnap;DataSnapCommon;emsclient;FireDACCommon;dxSkinOffice2010BlueRS23;bdertl;JvDB;dxSkinVS2010RS23;dxSkinMetropolisRS23;DataSnapConnectors;cxVerticalGridRS23;soapserver;dxSkinCaramelRS23;frxTee23;dxTileControlRS23;JclDeveloperTools;cxGridRS23;CPortLibDXE;FireDACOracleDriver;DBXMySQLDriver;JvCmp;rbFireDAC1723;DBXFirebirdDriver;FireDACCommonDriver;rbTCUI1723;LockBoxDR;inet;IndyIPCommon;JvCustom;dxSkinDarkRoomRS23;dxDockingRS23;vcl;dxSkinOffice2007GreenRS23;dxPScxExtCommonRS23;JvXPCtrls;dxSkinsCoreRS23;FireDACDb2Driver;dxThemeRS23;dxSkinsdxRibbonPainterRS23;dxSkinVisualStudio2013BlueRS23;rbRest1723;TSG5201;dxSkinMoneyTwinsRS23;dxPSdxFCLnkRS23;dxtrmdRS23;TeeDB;FireDAC;cxSchedulerTreeBrowserRS23;JvCore;dxFireDACServerModeRS23;dxSkinBlueRS23;OverbyteIcsD10SRun;JvCrypt;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;cxEditorsRS23;dxSkinGlassOceansRS23;JvDlgs;JvRuntimeDesign;dxSkinsdxNavBarPainterRS23;dxGaugeControlRS23;ibxpress;Tee;dxSkinSharpRS23;DataSnapServer;ibxbindings;cxPivotGridOLAPRS23;rbIDE1723;vclwinx;FireDACDSDriver;dxSkinBlueprintRS23;dxSkinOffice2007BlackRS23;CustomIPTransport;vcldsnap;rbBDE1723;dxSkinOffice2013LightGrayRS23;bindcomp;DBXInformixDriver;officeXPrt;dxPSdxGaugeControlLnkRS23;dxPScxPivotGridLnkRS23;dxorgcRS23;dxPSdxDBTVLnkRS23;dclRBADO1723;vclribbon;dbxcds;KernowSoftwareFMX;adortl;dclRBFireDAC1723;dclRBE1723;dxComnRS23;dsnapxml;dbrtl;inetdbxpress;IndyProtocols;cxExportRS23;dxSkinOffice2016DarkRS23;JclContainers;dxSkinVisualStudio2013DarkRS23;rbRCL1723;dxSkinscxSchedulerPainterRS23;rbRIDE1723;fmxase;$(DCC_UsePackage) + $(BDS)\bin\default_app.manifest + true + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png + + + DBXSqliteDriver;DBXDb2Driver;dxCoreRS23;vclactnband;vclFireDAC;dxPSLnksRS23;dxPSdxLCLnkRS23;tethering;cxDataRS23;dxPSdxOCLnkRS23;dxTabbedMDIRS23;FireDACADSDriver;dxSkinBlackRS23;dxSkinLondonLiquidSkyRS23;dxDBXServerModeRS23;dxHttpIndyRequestRS23;dxPScxGridLnkRS23;cxSchedulerRS23;FireDACMSSQLDriver;vcltouch;vcldb;dxWizardControlRS23;dxSkinMcSkinRS23;dxPScxCommonRS23;Intraweb;dxSkinOffice2007BlueRS23;dxBarRS23;cxSchedulerRibbonStyleEventEditorRS23;dxSkinOffice2013WhiteRS23;dxPSTeeChartRS23;cxLibraryRS23;dxSkinVisualStudio2013LightRS23;vclib;cxPivotGridChartRS23;dxSkinSummer2008RS23;dxPSdxDBOCLnkRS23;dxGDIPlusRS23;dxSkinDarkSideRS23;FireDACDBXDriver;dxSkinFoggyRS23;dxSkinSevenRS23;vclx;dxSkinOffice2010SilverRS23;dxdborRS23;RESTBackendComponents;dxLayoutControlRS23;dxPSPrVwRibbonRS23;VCLRESTComponents;dxSkinDevExpressStyleRS23;dxSkinWhiteprintRS23;vclie;bindengine;CloudService;FireDACMySQLDriver;dxSkinOffice2013DarkGrayRS23;DataSnapClient;dxPScxPCProdRS23;bindcompdbx;DBXSybaseASEDriver;IndyIPServer;dxSkinPumpkinRS23;IndySystem;dsnapcon;cxTreeListdxBarPopupMenuRS23;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;dxSkinLilianRS23;dxBarDBNavRS23;dxFlowChartRS23;dxSkinOffice2016ColorfulRS23;DBXOdbcDriver;FireDACTDataDriver;FMXTee;ipstudiowinclient;soaprtl;DbxCommonDriver;dxSpreadSheetRS23;AsyncProDR;dxSkinOffice2007PinkRS23;dxPSdxSpreadSheetLnkRS23;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;dxSkinHighContrastRS23;rtl;dxSkinSevenClassicRS23;DbxClientDriver;dxSkinDevExpressDarkStyleRS23;DBXSybaseASADriver;dxNavBarRS23;dxSkinMetropolisDarkRS23;dxSkinTheAsphaltWorldRS23;dxRichEditControlRS23;ipstudiowin;appanalytics;cxPivotGridRS23;dxSkinsdxDLPainterRS23;IndyIPClient;dxRibbonRS23;dxPScxVGridLnkRS23;bindcompvcl;dxSkinOffice2007SilverRS23;dxPScxTLLnkRS23;dxMapControlRS23;TeeUI;VclSmp;dxPScxSchedulerLnkRS23;cxTreeListRS23;FireDACODBCDriver;DataSnapIndy10ServerTransport;dxRibbonCustomizationFormRS23;dxPSRichEditControlLnkRS23;dxBarExtDBItemsRS23;DataSnapProviderClient;FireDACMongoDBDriver;dxSkiniMaginaryRS23;dxSpellCheckerRS23;dxSkinsdxBarPainterRS23;dxSkinCoffeeRS23;DataSnapServerMidas;RESTComponents;DBXInterBaseDriver;dxADOServerModeRS23;emsclientfiredac;DataSnapFireDAC;dxmdsRS23;dxSkinLiquidSkyRS23;dxdbtrRS23;dxSkinSpringTimeRS23;dxPSDBTeeChartRS23;dxSkinscxPCPainterRS23;dxPSCoreRS23;DBXMSSQLDriver;dxSkinXmas2008BlueRS23;DatasnapConnectorsFreePascal;bindcompfmx;DBXOracleDriver;dxSkinSilverRS23;dxSkinValentineRS23;inetdb;FmxTeeUI;dxBarExtItemsRS23;FireDACIBDriver;fmx;fmxdae;dxServerModeRS23;dxPsPrVwAdvRS23;dxSkinOffice2010BlackRS23;cxPageControlRS23;dxSkinStardustRS23;cxSchedulerGridRS23;dbexpress;IndyCore;dxSkinSharpPlusRS23;dsnap;DataSnapCommon;emsclient;FireDACCommon;dxSkinOffice2010BlueRS23;dxSkinVS2010RS23;dxSkinMetropolisRS23;DataSnapConnectors;cxVerticalGridRS23;soapserver;dxSkinCaramelRS23;dxTileControlRS23;cxGridRS23;FireDACOracleDriver;DBXMySQLDriver;DBXFirebirdDriver;FireDACCommonDriver;LockBoxDR;inet;IndyIPCommon;dxSkinDarkRoomRS23;dxDockingRS23;vcl;dxSkinOffice2007GreenRS23;dxPScxExtCommonRS23;dxSkinsCoreRS23;FireDACDb2Driver;dxThemeRS23;dxSkinsdxRibbonPainterRS23;dxSkinVisualStudio2013BlueRS23;dxSkinMoneyTwinsRS23;dxPSdxFCLnkRS23;dxtrmdRS23;TeeDB;FireDAC;cxSchedulerTreeBrowserRS23;dxFireDACServerModeRS23;dxSkinBlueRS23;OverbyteIcsD10SRun;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;cxEditorsRS23;dxSkinGlassOceansRS23;dxSkinsdxNavBarPainterRS23;dxGaugeControlRS23;ibxpress;Tee;dxSkinSharpRS23;DataSnapServer;ibxbindings;cxPivotGridOLAPRS23;vclwinx;FireDACDSDriver;dxSkinBlueprintRS23;dxSkinOffice2007BlackRS23;CustomIPTransport;vcldsnap;dxSkinOffice2013LightGrayRS23;bindcomp;DBXInformixDriver;officeXPrt;dxPSdxGaugeControlLnkRS23;dxPScxPivotGridLnkRS23;dxorgcRS23;dxPSdxDBTVLnkRS23;vclribbon;dbxcds;adortl;dxComnRS23;dsnapxml;dbrtl;inetdbxpress;IndyProtocols;cxExportRS23;dxSkinOffice2016DarkRS23;dxSkinVisualStudio2013DarkRS23;dxSkinscxSchedulerPainterRS23;fmxase;$(DCC_UsePackage) + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png + + + DEBUG;$(DCC_Define) + true + false + true + true + true + + + 1033 + true + true + false + Debug + PerMonitor + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + true + PerMonitor + + + + MainSource + + + +
MainForm
+ dfm +
+ + Base + + + Cfg_1 + Base + + + Cfg_2 + Base + +
+ + Delphi.Personality.12 + Application + + + + logfmt_appender.dpr + + + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + Microsoft Office 2000 Sample Automation Server Wrapper Components + + + + + + + logfmt_appender.exe + true + + + + + 1 + + + Contents\MacOS + 1 + + + 0 + + + + + res\xml + 1 + + + res\xml + 1 + + + + + library\lib\armeabi + 1 + + + library\lib\armeabi + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + library\lib\mips + 1 + + + library\lib\mips + 1 + + + + + library\lib\armeabi-v7a + 1 + + + library\lib\arm64-v8a + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-anydpi-v21 + 1 + + + res\drawable-anydpi-v21 + 1 + + + + + res\values + 1 + + + res\values + 1 + + + + + res\values-v21 + 1 + + + res\values-v21 + 1 + + + + + res\values-v31 + 1 + + + res\values-v31 + 1 + + + + + res\drawable-anydpi-v26 + 1 + + + res\drawable-anydpi-v26 + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-anydpi-v33 + 1 + + + res\drawable-anydpi-v33 + 1 + + + + + res\values + 1 + + + res\values + 1 + + + + + res\values-night-v21 + 1 + + + res\values-night-v21 + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-xxhdpi + 1 + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-xxxhdpi + 1 + + + res\drawable-xxxhdpi + 1 + + + + + res\drawable-ldpi + 1 + + + res\drawable-ldpi + 1 + + + + + res\drawable-mdpi + 1 + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + res\drawable-xhdpi + 1 + + + + + res\drawable-mdpi + 1 + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + res\drawable-xhdpi + 1 + + + + + res\drawable-xxhdpi + 1 + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-xxxhdpi + 1 + + + res\drawable-xxxhdpi + 1 + + + + + res\drawable-small + 1 + + + res\drawable-small + 1 + + + + + res\drawable-normal + 1 + + + res\drawable-normal + 1 + + + + + res\drawable-large + 1 + + + res\drawable-large + 1 + + + + + res\drawable-xlarge + 1 + + + res\drawable-xlarge + 1 + + + + + res\values + 1 + + + res\values + 1 + + + + + res\drawable-anydpi-v24 + 1 + + + res\drawable-anydpi-v24 + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-night-anydpi-v21 + 1 + + + res\drawable-night-anydpi-v21 + 1 + + + + + res\drawable-anydpi-v31 + 1 + + + res\drawable-anydpi-v31 + 1 + + + + + res\drawable-night-anydpi-v31 + 1 + + + res\drawable-night-anydpi-v31 + 1 + + + + + 1 + + + Contents\MacOS + 1 + + + 0 + + + + + Contents\MacOS + 1 + .framework + + + Contents\MacOS + 1 + .framework + + + Contents\MacOS + 1 + .framework + + + 0 + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + 0 + .dll;.bpl + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + 0 + .bpl + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + Contents\Resources\StartUp\ + 0 + + + Contents\Resources\StartUp\ + 0 + + + Contents\Resources\StartUp\ + 0 + + + 0 + + + + + 1 + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + ..\ + 1 + + + ..\ + 1 + + + ..\ + 1 + + + + + Contents + 1 + + + Contents + 1 + + + Contents + 1 + + + + + Contents\Resources + 1 + + + Contents\Resources + 1 + + + Contents\Resources + 1 + + + + + library\lib\armeabi-v7a + 1 + + + library\lib\arm64-v8a + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + Contents\MacOS + 1 + + + Contents\MacOS + 1 + + + Contents\MacOS + 1 + + + 0 + + + + + library\lib\armeabi-v7a + 1 + + + + + 1 + + + 1 + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + ..\ + 1 + + + ..\ + 1 + + + ..\ + 1 + + + + + 1 + + + 1 + + + 1 + + + + + ..\$(PROJECTNAME).launchscreen + 64 + + + ..\$(PROJECTNAME).launchscreen + 64 + + + + + 1 + + + 1 + + + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + + + + + + + + + + + + + + True + False + + + 12 + + + + +
diff --git a/lib/loggerpro/samples/130_simple_console_appender/SimpleConsole_appender.dpr b/lib/loggerpro/samples/130_simple_console_appender/SimpleConsole_appender.dpr index d1849789..de4731c9 100644 --- a/lib/loggerpro/samples/130_simple_console_appender/SimpleConsole_appender.dpr +++ b/lib/loggerpro/samples/130_simple_console_appender/SimpleConsole_appender.dpr @@ -17,6 +17,9 @@ var begin lLog := BuildLogWriter([TLoggerProSimpleConsoleAppender.Create]); + //Use the following line to enable LogFmt log format + //lLog := BuildLogWriter([TLoggerProSimpleConsoleLogFmtAppender.Create]); + Setlength (lTasks, MAX_TASK); for var i := 0 to MAX_TASK - 1 do begin lTasks[i] := TTask.Create(procedure diff --git a/lib/loggerpro/samples/130_simple_console_appender/SimpleConsole_appender.dproj b/lib/loggerpro/samples/130_simple_console_appender/SimpleConsole_appender.dproj index 8760839b..d6e8a91c 100644 --- a/lib/loggerpro/samples/130_simple_console_appender/SimpleConsole_appender.dproj +++ b/lib/loggerpro/samples/130_simple_console_appender/SimpleConsole_appender.dproj @@ -1,7 +1,7 @@  {D931889E-64C6-4A22-A6ED-294C90705C75} - 19.5 + 20.2 None True Debug @@ -9,6 +9,7 @@ 131 Console SimpleConsole_appender.dpr + SimpleConsole_appender true @@ -189,7 +190,7 @@ Microsoft Office XP Sample Automation Server Wrapper Components - + true @@ -218,16 +219,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -238,12 +229,6 @@ 1 - - - library\lib\armeabi-v7a - 1 - - library\lib\armeabi @@ -296,6 +281,16 @@ 1 + + + res\drawable-anydpi-v21 + 1 + + + res\drawable-anydpi-v21 + 1 + + res\values @@ -316,6 +311,66 @@ 1 + + + res\values-v31 + 1 + + + res\values-v31 + 1 + + + + + res\drawable-anydpi-v26 + 1 + + + res\drawable-anydpi-v26 + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-anydpi-v33 + 1 + + + res\drawable-anydpi-v33 + 1 + + res\values @@ -326,6 +381,16 @@ 1 + + + res\values-night-v21 + 1 + + + res\values-night-v21 + 1 + + res\drawable @@ -496,6 +561,56 @@ 1 + + + res\drawable-anydpi-v24 + 1 + + + res\drawable-anydpi-v24 + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-night-anydpi-v21 + 1 + + + res\drawable-night-anydpi-v21 + 1 + + + + + res\drawable-anydpi-v31 + 1 + + + res\drawable-anydpi-v31 + 1 + + + + + res\drawable-night-anydpi-v31 + 1 + + + res\drawable-night-anydpi-v31 + 1 + + 1 @@ -736,6 +851,9 @@ 1 + + 1 + @@ -1029,6 +1147,7 @@ + False