-
-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
51288f8
commit 0a19f3b
Showing
10 changed files
with
1,431 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
lib/loggerpro/samples/06_logfmt_appender/LoggerProConfig.pas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
16 changes: 16 additions & 0 deletions
16
lib/loggerpro/samples/06_logfmt_appender/logfmt_appender.dpr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
Oops, something went wrong.