diff --git a/.gitignore b/.gitignore index d16bc27..f6d9af9 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,4 @@ Samples/# Default Sample/iOSDevice64/Debug/DefaultSample.dSYM Samples/# Default Sample/iOSSimARM64/Debug/DefaultSample.dSYM Samples/# Default Sample/iOSDevice64/Debug/DefaultSample Samples/# Default Sample/iOSSimARM64/Debug/DefaultSample +Samples/Linux/horse/bin/HorseLinux_MultiLog4D diff --git a/MultiLog4D.groupproj b/MultiLog4D.groupproj index f950994..9ec3025 100644 --- a/MultiLog4D.groupproj +++ b/MultiLog4D.groupproj @@ -24,6 +24,9 @@ + + + Default.Personality.12 @@ -95,14 +98,23 @@ + + + + + + + + + - + - + - + diff --git a/Samples/# Default Sample/DefaultSample.dpr b/Samples/# Default Sample/DefaultSample.dpr index 87c8cd6..1e0b451 100644 --- a/Samples/# Default Sample/DefaultSample.dpr +++ b/Samples/# Default Sample/DefaultSample.dpr @@ -16,7 +16,7 @@ begin TMultiLog4DUtil .Logger .Tag('MultiLog4D') - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} + {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_EVENTVIEWER)} .Output(loBoth) .FileName(TPath.Combine(ExtractFilePath(ParamStr(0)), 'log\MeuLog.log')) {$ENDIF} diff --git a/Samples/Linux/horse/HorseLinux_MultiLog4D.deployproj b/Samples/Linux/horse/HorseLinux_MultiLog4D.deployproj new file mode 100644 index 0000000..3be9e1a --- /dev/null +++ b/Samples/Linux/horse/HorseLinux_MultiLog4D.deployproj @@ -0,0 +1,54 @@ + + + + 12 + + + + + + + + + + + HorseLinux_MultiLog4D\ + HorseLinux_MultiLog4D.exe + ProjectOutput + 0 + + + True + True + + + + + + + + + + + + HorseLinux_MultiLog4D\ + HorseLinux_MultiLog4D + ProjectOutput + 1 + + + True + True + + + HorseLinux_MultiLog4D\ + HorseLinux_MultiLog4D + ProjectOutput + 1 + + + True + True + + + diff --git a/Samples/Linux/horse/Horse_MultiLog4D.dpr b/Samples/Linux/horse/HorseLinux_MultiLog4D.dpr similarity index 50% rename from Samples/Linux/horse/Horse_MultiLog4D.dpr rename to Samples/Linux/horse/HorseLinux_MultiLog4D.dpr index a4e0f25..ae995a7 100644 --- a/Samples/Linux/horse/Horse_MultiLog4D.dpr +++ b/Samples/Linux/horse/HorseLinux_MultiLog4D.dpr @@ -1,9 +1,10 @@ -program Horse_MultiLog4D; +program HorseLinux_MultiLog4D; {$APPTYPE CONSOLE} {$R *.res} + uses Horse, MultiLog4D.Common, @@ -15,59 +16,49 @@ uses begin TMultiLog4DUtil .Logger - .Tag('MultiLog4D') - .Output(loConsole) - .LogWriteInformation('>>>>>>>>>> Starting <<<<<<<<<<'); + .LogWriteInformation('Start Application'); THorse .Get('/test1', procedure(Req: THorseRequest; Res: THorseResponse) begin + Randomize; + TMultiLog4DUtil .Logger - .Output(loConsole) - .LogWriteInformation('Before Test1'); + .LogWriteInformation('Before Test1 - ' + Format('Mensagem de teste 1 de log: %d', [Random(1000)])); Res.Send('test1'); TMultiLog4DUtil .Logger - .Output(loConsole) - .LogWriteInformation('After Test1'); + .LogWriteInformation('After Test1 - ' + Format('Mensagem de teste 1 de log: %d', [Random(1000)])); end ) .Get('/test2', procedure(Req: THorseRequest; Res: THorseResponse) begin + Randomize; Res.Send('test2'); TMultiLog4DUtil .Logger - .Output(loFile) - .Category(TEventCategory.ecSecurity) - .LogWriteInformation('Test2'); + .LogWriteInformation(Format('Mensagem de teste 2 de log: %d', [Random(1000)])); end ) .Get('/test3', procedure(Req: THorseRequest; Res: THorseResponse) - var - LOutputLogPath : string; begin + Randomize; Res.Send('test3'); - LOutputLogPath := TPath.Combine(ExtractFilePath(ParamStr(0)), 'MyLog'); - ForceDirectories(LOutputLogPath); - TMultiLog4DUtil .Logger - .Category(TEventCategory.ecSecurity) - .EventID(123) - .Output(loBoth) - .FileName(TPath.Combine(LOutputLogPath, 'Log.txt')) - .LogWriteInformation('Test3'); + .LogWriteInformation(Format('Mensagem de teste 3 de log: %d', [Random(1000)])); end ); THorse .Listen(9000); + end. diff --git a/Samples/Linux/horse/Horse_MultiLog4D.dproj b/Samples/Linux/horse/HorseLinux_MultiLog4D.dproj similarity index 98% rename from Samples/Linux/horse/Horse_MultiLog4D.dproj rename to Samples/Linux/horse/HorseLinux_MultiLog4D.dproj index 0bc87dd..a34e3a9 100644 --- a/Samples/Linux/horse/Horse_MultiLog4D.dproj +++ b/Samples/Linux/horse/HorseLinux_MultiLog4D.dproj @@ -1,15 +1,14 @@  - {EF4844CC-8021-4626-BB20-6CD4E16517C4} + {A99B1AF2-F41B-4F7E-9AC3-5000BF8185A1} 20.1 None True Debug - Win32 - 131 + Linux64 + 128 Console - Horse_MultiLog4D.dpr - Horse_MultiLog4D + HorseLinux_MultiLog4D.dpr true @@ -114,7 +113,7 @@ false false System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) - Horse_MultiLog4D + HorseLinux_MultiLog4D modules\.dcp;modules\.dcu;modules;modules\horse\src;$(DCC_UnitSearchPath) @@ -233,7 +232,10 @@ /usr/bin/gnome-terminal -- "%debuggee%" (None) none - ML4D_CONSOLE;$(DCC_Define) + ML4D_CONSOLE;HORSE_DAEMON;$(DCC_Define) + .\bin + .\dcu + -cleaninstall -debugport=54321 false @@ -258,10 +260,12 @@ ..\..\..\src;$(DCC_UnitSearchPath) - ML4D_CONSOLE;$(DCC_Define) + ML4D_CONSOLE;HORSE_DAEMON;$(DCC_Define) /usr/bin/gnome-terminal -- "%debuggee%" (None) none + .\bin + .\dcu ML4D_CONSOLE;$(DCC_Define) @@ -299,7 +303,7 @@ - Horse_MultiLog4D.dpr + HorseLinux_MultiLog4D.dpr Microsoft Office 2000 Sample Automation Server Wrapper Components @@ -322,15 +326,21 @@ true - + + + HorseLinux_MultiLog4D.exe + true + + + - Horse_MultiLog4D + HorseLinux_MultiLog4D true - - - Horse_MultiLog4D.exe + + + HorseLinux_MultiLog4D true @@ -1293,8 +1303,8 @@ True False False - True - True + False + False 12 diff --git a/Samples/Linux/horse/HorseLinux_MultiLog4D.res b/Samples/Linux/horse/HorseLinux_MultiLog4D.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/Samples/Linux/horse/HorseLinux_MultiLog4D.res differ diff --git a/Samples/Linux/horse/Horse_MultiLog4D.res b/Samples/Linux/horse/Horse_MultiLog4D.res deleted file mode 100644 index 651f23d..0000000 Binary files a/Samples/Linux/horse/Horse_MultiLog4D.res and /dev/null differ diff --git a/Samples/Linux/horse/srv_horse.dpr b/Samples/Linux/horse/srv_horse.dpr deleted file mode 100644 index 31c3114..0000000 --- a/Samples/Linux/horse/srv_horse.dpr +++ /dev/null @@ -1,47 +0,0 @@ -program srv_horse; - -{$APPTYPE CONSOLE} - -{$R *.res} - -uses - Horse, - MultiLog4D.Common, - MultiLog4D.Util, - MultiLog4D.Types, - System.SysUtils; - -begin - THorse - .Get('/ping', - procedure(Req: THorseRequest; Res: THorseResponse) - begin - TMultiLog4DUtil - .Logger - {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} - .EventID(123) - .Category(ecNone) - .UserName('adriano') - {$ENDIF} - {$ENDIF} - .LogWriteInformation('Log Information'); - - Res.Send('pong'); - - TMultiLog4DUtil - .Logger - {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} - .EventID(123) - .Category(ecNone) - .UserName('adriano') - {$ENDIF} - {$ENDIF} - .LogWriteInformation('Erro'); - end - ); - - THorse - .Listen(9000); -end. diff --git a/Samples/Linux/horse/srv_horse.dproj b/Samples/Linux/horse/srv_horse.dproj deleted file mode 100644 index c46e697..0000000 --- a/Samples/Linux/horse/srv_horse.dproj +++ /dev/null @@ -1,1227 +0,0 @@ - - - {EF4844CC-8021-4626-BB20-6CD4E16517C4} - 20.1 - None - True - Debug - Win32 - srv_horse - 1 - Console - srv_horse.dpr - - - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Cfg_1 - true - true - - - true - Base - true - - - .\$(Platform)\$(Config) - .\$(Platform)\$(Config) - false - false - false - false - false - System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) - srv_horse - modules\.dcp;modules\.dcu;modules;modules\horse\src;$(DCC_UnitSearchPath) - - - SampleListViewMultiDetailAppearancePackage;fmx;DbxCommonDriver;bindengine;IndyIPCommon;emsclient;IndyProtocols;dbxcds;FmxTeeUI;FireDACSqliteDriver;DbxClientDriver;soapmidas;dbexpress;inet;FireDACDBXDriver;CustomIPTransport;ZCore;ZParseSql;IndySystem;FireDACCommon;ZComponent;bindcompdbx;rtl;DBXSqliteDriver;DataSnapFireDAC;FireDAC;xmlrtl;dsnap;DataSnapNativeClient;FireDACCommonDriver;IndyIPClient;bindcompfmx;fmxFireDAC;DataSnapCommon;fmxase;dbrtl;DBXInterBaseDriver;bindcomp;IndyCore;RESTBackendComponents;ZPlain;RESTComponents;IndyIPServer;dsnapxml;DataSnapClient;DataSnapProviderClient;emsclientfiredac;FireDACDSDriver;tethering;ZDbc;CloudService;FMXTee;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage) - $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png - $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png - $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png - $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png - $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png - $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png - $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png - $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png - $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png - $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png - true - true - $(BDS)\bin\Artwork\Android\FM_AdaptiveIcon_Monochrome.xml - $(BDS)\bin\Artwork\Android\FM_AdaptiveIcon_Foreground.xml - $(BDS)\bin\Artwork\Android\FM_AdaptiveIcon_Background.xml - $(BDS)\bin\Artwork\Android\FM_VectorizedSplash.xml - $(BDS)\bin\Artwork\Android\FM_VectorizedSplashDark.xml - $(BDS)\bin\Artwork\Android\FM_VectorizedSplashV31.xml - $(BDS)\bin\Artwork\Android\FM_VectorizedSplashV31Dark.xml - $(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png - $(BDS)\bin\Artwork\Android\FM_NotificationIcon_36x36.png - $(BDS)\bin\Artwork\Android\FM_NotificationIcon_48x48.png - $(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png - $(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png - false - true - $(BDS)\bin\Artwork\Android\FM_VectorizedNotificationIcon.xml - activity-1.7.2.dex.jar;annotation-experimental-1.3.0.dex.jar;annotation-jvm-1.6.0.dex.jar;annotations-13.0.dex.jar;appcompat-1.2.0.dex.jar;appcompat-resources-1.2.0.dex.jar;billing-6.0.1.dex.jar;biometric-1.1.0.dex.jar;browser-1.4.0.dex.jar;cloud-messaging.dex.jar;collection-1.1.0.dex.jar;concurrent-futures-1.1.0.dex.jar;core-1.10.1.dex.jar;core-common-2.2.0.dex.jar;core-ktx-1.10.1.dex.jar;core-runtime-2.2.0.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;error_prone_annotations-2.9.0.dex.jar;exifinterface-1.3.6.dex.jar;firebase-annotations-16.2.0.dex.jar;firebase-common-20.3.1.dex.jar;firebase-components-17.1.0.dex.jar;firebase-datatransport-18.1.7.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-encoders-proto-16.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.1.3.dex.jar;firebase-installations-interop-17.1.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-23.1.2.dex.jar;fmx.dex.jar;fragment-1.2.5.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;kotlin-stdlib-1.8.22.dex.jar;kotlin-stdlib-common-1.8.22.dex.jar;kotlin-stdlib-jdk7-1.8.22.dex.jar;kotlin-stdlib-jdk8-1.8.22.dex.jar;kotlinx-coroutines-android-1.6.4.dex.jar;kotlinx-coroutines-core-jvm-1.6.4.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.6.1.dex.jar;lifecycle-livedata-2.6.1.dex.jar;lifecycle-livedata-core-2.6.1.dex.jar;lifecycle-runtime-2.6.1.dex.jar;lifecycle-service-2.6.1.dex.jar;lifecycle-viewmodel-2.6.1.dex.jar;lifecycle-viewmodel-savedstate-2.6.1.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;okio-jvm-3.4.0.dex.jar;play-services-ads-22.2.0.dex.jar;play-services-ads-base-22.2.0.dex.jar;play-services-ads-identifier-18.0.0.dex.jar;play-services-ads-lite-22.2.0.dex.jar;play-services-appset-16.0.1.dex.jar;play-services-base-18.1.0.dex.jar;play-services-basement-18.1.0.dex.jar;play-services-cloud-messaging-17.0.1.dex.jar;play-services-location-21.0.1.dex.jar;play-services-maps-18.1.0.dex.jar;play-services-measurement-base-20.1.2.dex.jar;play-services-measurement-sdk-api-20.1.2.dex.jar;play-services-stats-17.0.2.dex.jar;play-services-tasks-18.0.2.dex.jar;print-1.0.0.dex.jar;profileinstaller-1.3.0.dex.jar;room-common-2.2.5.dex.jar;room-runtime-2.2.5.dex.jar;savedstate-1.2.1.dex.jar;sqlite-2.1.0.dex.jar;sqlite-framework-2.1.0.dex.jar;startup-runtime-1.1.1.dex.jar;tracing-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.1.8.dex.jar;transport-runtime-3.1.8.dex.jar;user-messaging-platform-2.0.0.dex.jar;vectordrawable-1.1.0.dex.jar;vectordrawable-animated-1.1.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.7.0.dex.jar - - - SampleListViewMultiDetailAppearancePackage;fmx;DbxCommonDriver;bindengine;IndyIPCommon;emsclient;IndyProtocols;dbxcds;FmxTeeUI;FireDACSqliteDriver;DbxClientDriver;soapmidas;dbexpress;inet;FireDACDBXDriver;CustomIPTransport;ZCore;ZParseSql;IndySystem;FireDACCommon;ZComponent;bindcompdbx;rtl;frce;DBXSqliteDriver;DataSnapFireDAC;FireDAC;xmlrtl;dsnap;DataSnapNativeClient;FireDACCommonDriver;IndyIPClient;bindcompfmx;fmxFireDAC;DataSnapCommon;dbrtl;DBXInterBaseDriver;bindcomp;IndyCore;RESTBackendComponents;ZPlain;RESTComponents;IndyIPServer;dsnapxml;DataSnapClient;DataSnapProviderClient;ACBr_Boleto;emsclientfiredac;FireDACDSDriver;tethering;ZDbc;CloudService;FMXTee;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage) - $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png - $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png - $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png - $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png - $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png - $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png - $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png - $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png - $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png - $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png - true - true - $(BDS)\bin\Artwork\Android\FM_AdaptiveIcon_Monochrome.xml - $(BDS)\bin\Artwork\Android\FM_AdaptiveIcon_Foreground.xml - $(BDS)\bin\Artwork\Android\FM_AdaptiveIcon_Background.xml - $(BDS)\bin\Artwork\Android\FM_VectorizedSplash.xml - $(BDS)\bin\Artwork\Android\FM_VectorizedSplashDark.xml - $(BDS)\bin\Artwork\Android\FM_VectorizedSplashV31.xml - $(BDS)\bin\Artwork\Android\FM_VectorizedSplashV31Dark.xml - $(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png - $(BDS)\bin\Artwork\Android\FM_NotificationIcon_36x36.png - $(BDS)\bin\Artwork\Android\FM_NotificationIcon_48x48.png - $(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png - $(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png - false - true - $(BDS)\bin\Artwork\Android\FM_VectorizedNotificationIcon.xml - activity-1.7.2.dex.jar;annotation-experimental-1.3.0.dex.jar;annotation-jvm-1.6.0.dex.jar;annotations-13.0.dex.jar;appcompat-1.2.0.dex.jar;appcompat-resources-1.2.0.dex.jar;billing-6.0.1.dex.jar;biometric-1.1.0.dex.jar;browser-1.4.0.dex.jar;cloud-messaging.dex.jar;collection-1.1.0.dex.jar;concurrent-futures-1.1.0.dex.jar;core-1.10.1.dex.jar;core-common-2.2.0.dex.jar;core-ktx-1.10.1.dex.jar;core-runtime-2.2.0.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;error_prone_annotations-2.9.0.dex.jar;exifinterface-1.3.6.dex.jar;firebase-annotations-16.2.0.dex.jar;firebase-common-20.3.1.dex.jar;firebase-components-17.1.0.dex.jar;firebase-datatransport-18.1.7.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-encoders-proto-16.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.1.3.dex.jar;firebase-installations-interop-17.1.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-23.1.2.dex.jar;fmx.dex.jar;fragment-1.2.5.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;kotlin-stdlib-1.8.22.dex.jar;kotlin-stdlib-common-1.8.22.dex.jar;kotlin-stdlib-jdk7-1.8.22.dex.jar;kotlin-stdlib-jdk8-1.8.22.dex.jar;kotlinx-coroutines-android-1.6.4.dex.jar;kotlinx-coroutines-core-jvm-1.6.4.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.6.1.dex.jar;lifecycle-livedata-2.6.1.dex.jar;lifecycle-livedata-core-2.6.1.dex.jar;lifecycle-runtime-2.6.1.dex.jar;lifecycle-service-2.6.1.dex.jar;lifecycle-viewmodel-2.6.1.dex.jar;lifecycle-viewmodel-savedstate-2.6.1.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;okio-jvm-3.4.0.dex.jar;play-services-ads-22.2.0.dex.jar;play-services-ads-base-22.2.0.dex.jar;play-services-ads-identifier-18.0.0.dex.jar;play-services-ads-lite-22.2.0.dex.jar;play-services-appset-16.0.1.dex.jar;play-services-base-18.1.0.dex.jar;play-services-basement-18.1.0.dex.jar;play-services-cloud-messaging-17.0.1.dex.jar;play-services-location-21.0.1.dex.jar;play-services-maps-18.1.0.dex.jar;play-services-measurement-base-20.1.2.dex.jar;play-services-measurement-sdk-api-20.1.2.dex.jar;play-services-stats-17.0.2.dex.jar;play-services-tasks-18.0.2.dex.jar;print-1.0.0.dex.jar;profileinstaller-1.3.0.dex.jar;room-common-2.2.5.dex.jar;room-runtime-2.2.5.dex.jar;savedstate-1.2.1.dex.jar;sqlite-2.1.0.dex.jar;sqlite-framework-2.1.0.dex.jar;startup-runtime-1.1.1.dex.jar;tracing-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.1.8.dex.jar;transport-runtime-3.1.8.dex.jar;user-messaging-platform-2.0.0.dex.jar;vectordrawable-1.1.0.dex.jar;vectordrawable-animated-1.1.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.7.0.dex.jar - - - fmx;DbxCommonDriver;bindengine;IndyIPCommon;emsclient;IndyProtocols;dbxcds;FmxTeeUI;FireDACSqliteDriver;DbxClientDriver;soapmidas;dbexpress;inet;FireDACDBXDriver;CustomIPTransport;ZCore;ZParseSql;ACBr_NFe;IndySystem;ACBr_Diversos;FireDACCommon;ZComponent;bindcompdbx;rtl;frce;DBXSqliteDriver;ACBr_Serial;DataSnapFireDAC;FireDAC;xmlrtl;dsnap;DataSnapNativeClient;YxdUI;FireDACCommonDriver;IndyIPClient;bindcompfmx;fmxFireDAC;DataSnapCommon;fmxase;dbrtl;DBXInterBaseDriver;bindcomp;IndyCore;RESTBackendComponents;ZPlain;RESTComponents;IndyIPServer;dsnapxml;DataSnapClient;DataSnapProviderClient;ACBr_Boleto;emsclientfiredac;FireDACDSDriver;tethering;ZDbc;CloudService;FMXTee;ACBr_NFeDanfeRL;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage) - - - fmx;DbxCommonDriver;bindengine;IndyIPCommon;emsclient;IndyProtocols;dbxcds;FmxTeeUI;FireDACSqliteDriver;DbxClientDriver;soapmidas;dbexpress;inet;FireDACDBXDriver;CustomIPTransport;ZCore;ZParseSql;IndySystem;FireDACCommon;ZComponent;bindcompdbx;rtl;DBXSqliteDriver;DataSnapFireDAC;FireDAC;xmlrtl;dsnap;DataSnapNativeClient;FireDACCommonDriver;IndyIPClient;bindcompfmx;fmxFireDAC;DataSnapCommon;fmxase;dbrtl;DBXInterBaseDriver;bindcomp;IndyCore;RESTBackendComponents;ZPlain;RESTComponents;IndyIPServer;dsnapxml;DataSnapClient;DataSnapProviderClient;emsclientfiredac;FireDACDSDriver;tethering;ZDbc;CloudService;FMXTee;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage) - - - DataSnapServer;fmx;DbxCommonDriver;bindengine;FireDACCommonODBC;emsclient;IndyProtocols;dbxcds;FireDACSqliteDriver;DbxClientDriver;soapmidas;dbexpress;inet;CustomIPTransport;FireDACMSSQLDriver;IndySystem;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;emsserverresource;rtl;FireDACMySQLDriver;frce;DataSnapFireDAC;FireDAC;xmlrtl;dsnap;FireDACDb2Driver;DataSnapNativeClient;DatasnapConnectorsFreePascal;emshosting;FireDACCommonDriver;emsedge;inetdb;FireDACASADriver;FireDACInfxDriver;DataSnapCommon;dbrtl;FireDACOracleDriver;DataSnapIndy10ServerTransport;DataSnapConnectors;FireDACMongoDBDriver;FireDACTDataDriver;bindcomp;IndyCore;RESTBackendComponents;FireDACADSDriver;RESTComponents;dsnapxml;DataSnapClient;ACBr_Boleto;emsclientfiredac;FireDACPgDriver;CloudService;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage) - - - DataSnapServer;fmx;DbxCommonDriver;bindengine;IndyIPCommon;FireDACCommonODBC;emsclient;IndyProtocols;dbxcds;FmxTeeUI;DBXFirebirdDriver;FireDACSqliteDriver;DbxClientDriver;soapmidas;dbexpress;inet;FireDACDBXDriver;fmxdae;CustomIPTransport;FireDACMSSQLDriver;IndySystem;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;bindcompdbx;rtl;FireDACMySQLDriver;frce;DBXSqliteDriver;DataSnapFireDAC;inetdbxpress;FireDAC;xmlrtl;dsnap;DBXOracleDriver;DBXInformixDriver;fmxobj;DataSnapNativeClient;FireDACCommonDriver;IndyIPClient;bindcompfmx;inetdb;FireDACASADriver;fmxFireDAC;DBXMySQLDriver;DataSnapCommon;fmxase;dbrtl;FireDACOracleDriver;DataSnapIndy10ServerTransport;DBXInterBaseDriver;FireDACMongoDBDriver;FireDACTDataDriver;bindcomp;IndyCore;RESTBackendComponents;RESTComponents;IndyIPServer;dsnapxml;DataSnapClient;DataSnapProviderClient;emsclientfiredac;FireDACPgDriver;FireDACDSDriver;tethering;CloudService;DBXSybaseASADriver;FMXTee;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage) - true - - - DataSnapServer;fmx;DbxCommonDriver;bindengine;IndyIPCommon;FireDACCommonODBC;emsclient;IndyProtocols;dbxcds;FmxTeeUI;DBXFirebirdDriver;FireDACSqliteDriver;DbxClientDriver;soapmidas;dbexpress;inet;FireDACDBXDriver;fmxdae;CustomIPTransport;FireDACMSSQLDriver;IndySystem;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;bindcompdbx;rtl;FireDACMySQLDriver;DBXSqliteDriver;DataSnapFireDAC;inetdbxpress;FireDAC;xmlrtl;dsnap;DBXOracleDriver;DBXInformixDriver;fmxobj;DataSnapNativeClient;FireDACCommonDriver;IndyIPClient;bindcompfmx;inetdb;FireDACASADriver;fmxFireDAC;DBXMySQLDriver;DataSnapCommon;fmxase;dbrtl;FireDACOracleDriver;DataSnapIndy10ServerTransport;DBXInterBaseDriver;FireDACMongoDBDriver;FireDACTDataDriver;bindcomp;IndyCore;RESTBackendComponents;RESTComponents;IndyIPServer;dsnapxml;DataSnapClient;DataSnapProviderClient;emsclientfiredac;FireDACPgDriver;FireDACDSDriver;tethering;CloudService;DBXSybaseASADriver;FMXTee;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage) - true - - - SampleListViewMultiDetailAppearancePackage;vclwinx;DataSnapServer;ACBr_TCP;fmx;vclie;DbxCommonDriver;bindengine;IndyIPCommon;VCLRESTComponents;DBXMSSQLDriver;FireDACCommonODBC;emsclient;aurelius;ACBr_OpenSSL;appanalytics;IndyProtocols;vclx;Skia.Package.RTL;dbxcds;vcledge;FmxTeeUI;ACBr_BoletoRL;DBXFirebirdDriver;dacvcl290;FireDACSqliteDriver;DbxClientDriver;soapmidas;TeeUI;frCoreLibrary29;dbexpress;vquery290;inet;ACBr_BoletoFPDF;vcltouch;FireDACDBXDriver;fmxdae;tmsbcl;CustomIPTransport;FireDACMSSQLDriver;ZCore;ZParseSql;C4DWizard;ACBr_NFe;IndySystem;ACBr_Diversos;BossExperts;frxe29;vclFireDAC;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;emsserverresource;ZComponent;pkgADRIFoodMarket;bindcompdbx;rtl;FireDACMySQLDriver;ACBr_NFeDanfeFR;frce;remotedb;DBXSqliteDriver;DBXSybaseASEDriver;ACBr_Serial;ACBr_Comum;ACBr_NFeDanfeESCPOS;vclimg;DataSnapFireDAC;unidacfmx290;inetdbxpress;FireDAC;xmlrtl;dsnap;xdata;pkgADRIFood;FireDACDb2Driver;DBXOracleDriver;DBXInformixDriver;fmxobj;bindcompvclsmp;DataSnapNativeClient;frx29;YxdUI;DatasnapConnectorsFreePascal;FMXTMSFNCUIPackPkgDXE15;ACBr_OpenDelivery;ACBr_NFeDanfeFPDF;TMSLogging;FMXTMSFNCCorePkgDXE15;emshosting;sparkle;frxDB29;frLocalizationLibrary29;FireDACCommonDriver;sphinx;IndyIPClient;bindcompvclwinx;emsedge;bindcompfmx;crcontrols290;inetdb;FireDACASADriver;Tee;vclactnband;fmxFireDAC;FireDACInfxDriver;DBXMySQLDriver;VclSmp;DataSnapCommon;PkgBrasil4D;fmxase;DBXOdbcDriver;dbrtl;FireDACOracleDriver;Skia.Package.FMX;TeeDB;FireDACMSAccDriver;DataSnapIndy10ServerTransport;DataSnapConnectors;vcldsnap;DBXInterBaseDriver;FireDACMongoDBDriver;FireDACTDataDriver;Skia.Package.VCL;VCLTMSFNCUIPackPkgDXE15;vcldb;ACBr_Integrador;ACBr_PIXCD;unidacvcl290;dacfmx290;bindcomp;ACBr_BoletoFR;MobileExperts;IndyCore;RESTBackendComponents;ZPlain;FireDACADSDriver;MobilePermissions;RESTComponents;IndyIPServer;vcl;dsnapxml;adortl;dsnapcon;DataSnapClient;DataSnapProviderClient;dac290;DBXDb2Driver;ACBr_Boleto;emsclientfiredac;FireDACPgDriver;FireDACDSDriver;tethering;ZDbc;bindcompvcl;CloudService;DBXSybaseASADriver;FMXTee;ACBr_NFeDanfeRL;VCLTMSFNCCorePkgDXE15;soaprtl;unidac290;soapserver;FireDACIBDriver;$(DCC_UsePackage) - Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - Debug - CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= - 1033 - true - $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png - $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png - - - vclwinx;DataSnapServer;fmx;vclie;DbxCommonDriver;bindengine;IndyIPCommon;VCLRESTComponents;DBXMSSQLDriver;FireDACCommonODBC;emsclient;appanalytics;IndyProtocols;vclx;dbxcds;vcledge;FmxTeeUI;DBXFirebirdDriver;FireDACSqliteDriver;DbxClientDriver;soapmidas;TeeUI;frCoreLibrary29;dbexpress;inet;vcltouch;FireDACDBXDriver;fmxdae;CustomIPTransport;FireDACMSSQLDriver;ZCore;ZParseSql;IndySystem;frxe29;vclFireDAC;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;emsserverresource;ZComponent;bindcompdbx;rtl;FireDACMySQLDriver;DBXSqliteDriver;DBXSybaseASEDriver;vclimg;DataSnapFireDAC;inetdbxpress;FireDAC;xmlrtl;dsnap;pkgADRIFood;FireDACDb2Driver;DBXOracleDriver;DBXInformixDriver;fmxobj;bindcompvclsmp;DataSnapNativeClient;frx29;DatasnapConnectorsFreePascal;FMXTMSFNCUIPackPkgDXE15;FMXTMSFNCCorePkgDXE15;emshosting;frxDB29;frLocalizationLibrary29;FireDACCommonDriver;IndyIPClient;bindcompvclwinx;emsedge;bindcompfmx;inetdb;FireDACASADriver;Tee;vclactnband;fmxFireDAC;FireDACInfxDriver;DBXMySQLDriver;VclSmp;DataSnapCommon;fmxase;DBXOdbcDriver;dbrtl;FireDACOracleDriver;TeeDB;FireDACMSAccDriver;DataSnapIndy10ServerTransport;DataSnapConnectors;vcldsnap;DBXInterBaseDriver;FireDACMongoDBDriver;FireDACTDataDriver;Skia.Package.VCL;VCLTMSFNCUIPackPkgDXE15;vcldb;bindcomp;IndyCore;RESTBackendComponents;ZPlain;FireDACADSDriver;RESTComponents;IndyIPServer;vcl;dsnapxml;adortl;dsnapcon;DataSnapClient;DataSnapProviderClient;DBXDb2Driver;emsclientfiredac;FireDACPgDriver;FireDACDSDriver;tethering;ZDbc;bindcompvcl;CloudService;DBXSybaseASADriver;FMXTee;VCLTMSFNCCorePkgDXE15;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage) - true - $(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 - true - true - - - false - ..\..\src\;$(DCC_UnitSearchPath) - 1033 - (None) - none - - - false - RELEASE;$(DCC_Define) - 0 - 0 - - - - MainSource - - - Base - - - Cfg_1 - Base - - - Cfg_2 - Base - - - - Delphi.Personality.12 - Application - - - - srv_horse.dpr - - - Microsoft Office 2000 Sample Automation Server Wrapper Components - Microsoft Office XP Sample Automation Server Wrapper Components - - - - - - true - - - - - true - - - - - true - - - - - srv_horse.exe - true - - - - - 1 - - - Contents\MacOS - 1 - - - 0 - - - - - classes - 64 - - - classes - 64 - - - - - 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 - - - - - - - - - - - - - - - - - False - False - False - False - False - False - False - True - False - - - 12 - - - - - diff --git a/Samples/Linux/horse/srv_horse.res b/Samples/Linux/horse/srv_horse.res deleted file mode 100644 index 447d5c1..0000000 Binary files a/Samples/Linux/horse/srv_horse.res and /dev/null differ diff --git a/Samples/VCL/horse/Horse_MultiLog4D.dproj b/Samples/VCL/horse/Horse_MultiLog4D.dproj index 0bc87dd..1c59d17 100644 --- a/Samples/VCL/horse/Horse_MultiLog4D.dproj +++ b/Samples/VCL/horse/Horse_MultiLog4D.dproj @@ -6,7 +6,7 @@ True Debug Win32 - 131 + 3 Console Horse_MultiLog4D.dpr Horse_MultiLog4D @@ -1290,7 +1290,7 @@ False False False - True + False False False True diff --git a/Samples/VCL/service/Service_MultiLog4D.dpr b/Samples/VCL/service/Service_MultiLog4D.dpr index b9d17ec..141391c 100644 --- a/Samples/VCL/service/Service_MultiLog4D.dpr +++ b/Samples/VCL/service/Service_MultiLog4D.dpr @@ -7,7 +7,7 @@ uses System.SysUtils, System.StrUtils, Vcl.SvcMgr, - Main in 'Main.pas' {Service2: TService}; + Main in 'Main.pas' {MultiLog4D: TService}; {$R *.RES} diff --git a/Samples/VCL/service/Service_MultiLog4D.dproj b/Samples/VCL/service/Service_MultiLog4D.dproj index 5e8ac6c..e100a3d 100644 --- a/Samples/VCL/service/Service_MultiLog4D.dproj +++ b/Samples/VCL/service/Service_MultiLog4D.dproj @@ -5,7 +5,7 @@ VCL True Debug - Win64 + Win32 Service_MultiLog4D 3 Application @@ -156,11 +156,13 @@ true true true + 1046 + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= false PerMonitorV2 - ML4D_SERVICE;$(DCC_Define) + ML4D_EVENTVIEWER;$(DCC_Define) .\bin .\dcu ..\..\..\src;$(DCC_UnitSearchPath) @@ -169,7 +171,7 @@ PerMonitorV2 - ML4D_SERVICE;$(DCC_Define) + ML4D_EVENTVIEWER;$(DCC_Define) .\bin ..\..\..\src;$(DCC_UnitSearchPath) .\dcu @@ -184,7 +186,7 @@ PerMonitorV2 - ML4D_SERVICE;$(DCC_Define) + ML4D_EVENTVIEWER;$(DCC_Define) .\bin ..\..\..\src;$(DCC_UnitSearchPath) .\dcu @@ -193,7 +195,7 @@ PerMonitorV2 - ML4D_SERVICE;$(DCC_Define) + ML4D_EVENTVIEWER;$(DCC_Define) .\bin ..\..\..\src;$(DCC_UnitSearchPath) .\dcu @@ -205,9 +207,10 @@ MainSource -
Service2
+
MultiLog4D
TService
+ Base @@ -234,7 +237,7 @@ - + Service_MultiLog4D.exe true diff --git a/Samples/VCL/service/Service_MultiLog4D.todo b/Samples/VCL/service/Service_MultiLog4D.todo new file mode 100644 index 0000000..e32d410 --- /dev/null +++ b/Samples/VCL/service/Service_MultiLog4D.todo @@ -0,0 +1 @@ +{DONE 5 -oAdriano Santos -cBug/Implementação : Ajustar no LInux} diff --git a/src/MultiLog4D.Base.pas b/src/MultiLog4D.Base.pas index 7c3c004..d00dd47 100644 --- a/src/MultiLog4D.Base.pas +++ b/src/MultiLog4D.Base.pas @@ -25,7 +25,7 @@ TMultiLog4DBase = class(TInterfacedObject, IMultiLog4D) class var FTag: string; class var FTagSet: Boolean; {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} + {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_EVENTVIEWER)} FUserName: string; FFileName: string; FEventCategory: TEventCategory; @@ -35,19 +35,21 @@ TMultiLog4DBase = class(TInterfacedObject, IMultiLog4D) function GetDefaultTag: string; function GetLogPrefix(const ALogType: TLogType): string; {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} + {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_EVENTVIEWER)} function GetCategoryName: string; {$ENDIF} {$ENDIF} public function Tag(const ATag: string): IMultiLog4D; virtual; {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} + {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_EVENTVIEWER)} function Category(const AEventCategory: TEventCategory): IMultiLog4D; virtual; function EventID(const AEventID: {$IFDEF MSWINDOWS}DWORD{$ENDIF}{$IFDEF LINUX}LONGWORD{$ENDIF}): IMultiLog4D; virtual; - function Output(const AOutput: TLogOutput): IMultiLog4D; virtual; function UserName(const AUserName: string): IMultiLog4D; virtual; + {$IFNDEF LINUX} + function Output(const AOutput: TLogOutput): IMultiLog4D; virtual; function FileName(const AFileName: string): IMultiLog4D; virtual; + {$ENDIF} {$ENDIF} {$ENDIF} function LogWrite(const AMsg: string; const ALogType: TLogType): IMultiLog4D; virtual; abstract; @@ -78,7 +80,7 @@ function TMultiLog4DBase.Tag(const ATag: string): IMultiLog4D; end; {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} -{$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} +{$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_EVENTVIEWER)} function TMultiLog4DBase.GetCategoryName: string; begin Result := EventCategoryNames[FEventCategory]; @@ -96,23 +98,23 @@ function TMultiLog4DBase.EventID(const AEventID: {$IFDEF MSWINDOWS}DWORD{$ENDIF} Result := Self; end; -function TMultiLog4DBase.Output(const AOutput: TLogOutput): IMultiLog4D; -begin - FLogOutput := AOutput; - Result := Self; -end; - function TMultiLog4DBase.UserName(const AUserName: string): IMultiLog4D; begin if not AUserName.IsEmpty then FUserName := AUserName else - //ToDo: Ajustar no Linux - FUserName := '' ;//TMultiLog4DCommon.GetCurrentUserName; + FUserName := TMultiLog4DCommon.GetCurrentUserName; Result := Self; end; +{$IFNDEF LINUX} +function TMultiLog4DBase.Output(const AOutput: TLogOutput): IMultiLog4D; +begin + FLogOutput := AOutput; + Result := Self; +end; + function TMultiLog4DBase.FileName(const AFileName: string): IMultiLog4D; begin FFileName := AFileName; @@ -120,6 +122,7 @@ function TMultiLog4DBase.FileName(const AFileName: string): IMultiLog4D; end; {$ENDIF} {$ENDIF} +{$ENDIF} function TMultiLog4DBase.GetLogPrefix(const ALogType: TLogType): string; begin diff --git a/src/MultiLog4D.Common.pas b/src/MultiLog4D.Common.pas index 2cb43d8..d20849d 100644 --- a/src/MultiLog4D.Common.pas +++ b/src/MultiLog4D.Common.pas @@ -9,6 +9,9 @@ interface {$IFDEF MSWINDOWS} ,Winapi.Windows {$ENDIF} + {$IFDEF LINUX} + ,Posix.Unistd + {$ENDIF} ; type @@ -19,6 +22,9 @@ TMultiLog4DCommon = class {$IFDEF MSWINDOWS} class function GetCurrentUserName: string; {$ENDIF} + {$IFDEF LINUX} + class function GetCurrentUserName: string; + {$ENDIF} end; implementation @@ -37,4 +43,18 @@ class function TMultiLog4DCommon.GetCurrentUserName: string; end; {$ENDIF} +{$IFDEF LINUX} +class function TMultiLog4DCommon.GetCurrentUserName: string; +var + LoginName: PAnsiChar; +begin + LoginName := getlogin; + if LoginName <> nil then + Result := string(LoginName) + else + Result := 'Unknown'; +end; +{$ENDIF} + + end. diff --git a/src/MultiLog4D.Factory.pas b/src/MultiLog4D.Factory.pas index f07ad11..1884a6e 100644 --- a/src/MultiLog4D.Factory.pas +++ b/src/MultiLog4D.Factory.pas @@ -22,7 +22,7 @@ implementation {$IFDEF MSWINDOWS} {$IFDEF ML4D_CONSOLE} MultiLog4D.Windows.Console, - {$ELSEIF DEFINED(ML4D_SERVICE)} + {$ELSEIF DEFINED(ML4D_EVENTVIEWER)} MultiLog4D.Windows.Services, {$ELSE} MultiLog4D.Windows.Files, @@ -30,10 +30,6 @@ implementation {$ELSEIF DEFINED(LINUX)} {$IFDEF ML4D_CONSOLE} MultiLog4D.Linux.Console, - {$ELSEIF DEFINED(ML4D_SERVICE)} - MultiLog4D.Linux.Daemon, - {$ELSE} - MultiLog4D.Linux.Desktop, {$ENDIF} {$ELSEIF DEFINED(MACOS)} {$IFDEF ML4D_DESKTOP} @@ -62,7 +58,7 @@ class function TLogFactory.GetLogger: IMultiLog4D; {$IFDEF MSWINDOWS} {$IFDEF ML4D_CONSOLE} FLogger := TMultiLog4DWindowsConsole.Create; - {$ELSEIF DEFINED(ML4D_SERVICE)} + {$ELSEIF DEFINED(ML4D_EVENTVIEWER)} FLogger := TMultiLog4DWindowsServices.Create; {$ELSE} FLogger := TMultiLog4DWindowsFile.Create(EmptyStr); @@ -70,11 +66,6 @@ class function TLogFactory.GetLogger: IMultiLog4D; {$ELSEIF DEFINED(LINUX)} {$IFDEF ML4D_CONSOLE} FLogger := TMultiLog4DLinuxConsole.Create; - {$ELSEIF DEFINED(ML4D_SERVICE)} - FLogger := TMultiLog4DLinuxDaemon.Create; - {$ELSE} - // Se nenhum específico definido, use Desktop como padrão - FLogger := TMultiLog4DLinuxFile.Create(EmptyStr); {$ENDIF} {$ELSEIF DEFINED(MACOS)} FLogger := TMultiLog4DMacOS.Create; @@ -88,57 +79,6 @@ class function TLogFactory.GetLogger: IMultiLog4D; {$ENDIF} end; - - -(* Funciona hoje - if not Assigned(FLogger) then - begin - {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - //{$IFDEF MSWINDOWS} - {$IFDEF ML4D_CONSOLE} - FLogger := TMultiLog4DWindowsConsole.Create; - {$ENDIF} - {$IFDEF ML4D_DESKTOP} - FLogger := TMultiLog4DWindowsFile.Create(EmptyStr); - {$ENDIF} - {$IFDEF ML4D_SERVICE} - FLogger := TMultiLog4DWindowsServices.Create; - {$ENDIF} - //{$ENDIF} - {$ELSE} - {$IFDEF ANDROID} - FLogger := TMultiLog4DAndroid.Create; - {$ENDIF} - {$IFDEF IOS} - FLogger := TMultiLog4DiOS.Create; - {$ENDIF} - {$ENDIF} - end; -*) - -(* - if not Assigned(FLogger) then - begin - {$IFDEF ANDROID} - FLogger := TMultiLog4DAndroid.Create; - {$ENDIF} - {$IFDEF IOS} - FLogger := TMultiLog4DiOS.Create; - {$ENDIF} - //{$IFDEF MSWINDOWS} - {$IFDEF ML4D_CONSOLE} - FLogger := TMultiLog4DWindowsConsole.Create; - {$ENDIF} - {$IFDEF ML4D_DESKTOP} - FLogger := TMultiLog4DWindowsFile.Create(EmptyStr); - {$ENDIF} - {$IFDEF ML4D_SERVICE} - FLogger := TMultiLog4DWindowsServices.Create; - {$ENDIF} - //{$ENDIF} - end; -*) - Result := FLogger; end; diff --git a/src/MultiLog4D.Interfaces.pas b/src/MultiLog4D.Interfaces.pas index 2c3b387..92142bd 100644 --- a/src/MultiLog4D.Interfaces.pas +++ b/src/MultiLog4D.Interfaces.pas @@ -9,8 +9,6 @@ interface Winapi.Windows, {$ENDIF} System.Classes, - {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$ENDIF} MultiLog4D.Types; type @@ -18,12 +16,14 @@ interface ['{85313A35-9033-4179-8046-B22AD3E36E60}'] function Tag(const ATag: string): IMultiLog4D; {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} + {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_EVENTVIEWER)} function Category(const AEventCategory: TEventCategory): IMultiLog4D; function EventID(const AEventID: {$IFDEF MSWINDOWS}DWORD{$ENDIF}{$IFDEF LINUX}LONGWORD{$ENDIF}): IMultiLog4D; function UserName(const AUserName: string): IMultiLog4D; + {$IFNDEF LINUX} function Output(const AOutput: TLogOutput): IMultiLog4D; function FileName(const AFileName: string): IMultiLog4D; + {$ENDIF} {$ENDIF} {$ENDIF} function LogWrite(const AMsg: string; const ALogType: TLogType): IMultiLog4D; diff --git a/src/MultiLog4D.Linux.Console.pas b/src/MultiLog4D.Linux.Console.pas index 70e5e5e..99487e0 100644 --- a/src/MultiLog4D.Linux.Console.pas +++ b/src/MultiLog4D.Linux.Console.pas @@ -4,29 +4,21 @@ interface uses System.SysUtils, - MultiLog4D.Common.WriteToFile, MultiLog4D.Base, MultiLog4D.Common, MultiLog4D.Interfaces, - MultiLog4D.Types; + MultiLog4D.Types, + MultiLog4D.Common.WriteToFile, + MultiLog4D.Posix.Syslog; type TMultiLog4DLinuxConsole = class(TMultiLog4DBase) private - procedure WriteToConsole(const AMsg: string; const ALogType: TLogType); - procedure LogWriteToFile(const AMsg: string; const ALogType: TLogType); + procedure WriteToSysLog(const AMsg: string; const ALogType: TLogType); protected procedure LogWriteToDestination(const AMsg: string; const ALogType: TLogType); public constructor Create; - {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} - function Category(const AEventCategory: TEventCategory): IMultiLog4D; override; - function EventID(const AEventID: LongWord): IMultiLog4D; override; - function UserName(const AUserName: string): IMultiLog4D; override; - function Output(const AOutput: TLogOutput): IMultiLog4D; override; - {$ENDIF} - {$ENDIF} function LogWrite(const AMsg: string; const ALogType: TLogType): IMultiLog4D; override; function LogWriteInformation(const AMsg: string): IMultiLog4D; override; function LogWriteWarning(const AMsg: string): IMultiLog4D; override; @@ -36,67 +28,33 @@ TMultiLog4DLinuxConsole = class(TMultiLog4DBase) implementation +{ TMultiLog4DLinuxConsole } + constructor TMultiLog4DLinuxConsole.Create; begin inherited Create; end; -procedure TMultiLog4DLinuxConsole.WriteToConsole(const AMsg: string; const ALogType: TLogType); +procedure TMultiLog4DLinuxConsole.WriteToSysLog(const AMsg: string; const ALogType: TLogType); +var + Priority: Integer; begin - Writeln(Format('%s %s %s - %s', - [FormatDateTime('yyyy-mm-dd hh:nn:ss', Now), - FUserName, - GetLogPrefix(ALogType), - AMsg])); -end; - -procedure TMultiLog4DLinuxConsole.LogWriteToFile(const AMsg: string; const ALogType: TLogType); -begin - TMultiLogWriteToFile.Instance - .FileName(FFileName) - .Execute(AMsg, ALogType); -end; - -procedure TMultiLog4DLinuxConsole.LogWriteToDestination(const AMsg: string; const ALogType: TLogType); -begin - case FLogOutput of - loConsole: WriteToConsole(AMsg, ALogType); - loFile: LogWriteToFile(AMsg, ALogType); - loBoth: - begin - WriteToConsole(AMsg, ALogType); - LogWriteToFile(AMsg, ALogType); - end; + case ALogType of + ltInformation: Priority := LOG_INFO; + ltWarning: Priority := LOG_WARNING; + ltError: Priority := LOG_ERR; + ltFatalError: Priority := LOG_CRIT; + else + Priority := LOG_INFO; end; -end; -{$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} -{$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} -function TMultiLog4DLinuxConsole.Category(const AEventCategory: TEventCategory): IMultiLog4D; -begin - FEventCategory := AEventCategory; - Result := Self; + syslog(Priority, AMsg); end; -function TMultiLog4DLinuxConsole.EventID(const AEventID: LongWord): IMultiLog4D; -begin - FEventID := AEventID; - Result := Self; -end; - -function TMultiLog4DLinuxConsole.UserName(const AUserName: string): IMultiLog4D; -begin - FUserName := AUserName; - Result := Self; -end; - -function TMultiLog4DLinuxConsole.Output(const AOutput: TLogOutput): IMultiLog4D; +procedure TMultiLog4DLinuxConsole.LogWriteToDestination(const AMsg: string; const ALogType: TLogType); begin - FLogOutput := AOutput; - Result := Self; + WriteToSysLog(AMsg, ALogType); end; -{$ENDIF} -{$ENDIF} function TMultiLog4DLinuxConsole.LogWrite(const AMsg: string; const ALogType: TLogType): IMultiLog4D; begin @@ -129,3 +87,5 @@ function TMultiLog4DLinuxConsole.LogWriteFatalError(const AMsg: string): IMultiL end; end. + + diff --git a/src/MultiLog4D.Logger.pas b/src/MultiLog4D.Logger.pas deleted file mode 100644 index 014c4b7..0000000 --- a/src/MultiLog4D.Logger.pas +++ /dev/null @@ -1,351 +0,0 @@ -unit MultiLog4D.Logger; - -interface - -uses - {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IFDEF MSWINDOWS} - Winapi.Windows, - {$ENDIF} - {$ENDIF} - System.SysUtils, - MultiLog4D.Interfaces, - MultiLog4D.Types, - MultiLog4D.Setup, - MultiLog4D.Factory; -(* -type - TMultiLog4DLogger = class(TInterfacedObject, IMultiLog4D) - private - FSetup: TMultiLog4DSetup; - FLoggerImpl: IMultiLog4D; - public - constructor Create; - function Setup: TMultiLog4DSetup; - function LogWrite(const AMsg: string; const ALogType: TLogType): IMultiLog4D; - function LogWriteInformation(const AMsg: string): IMultiLog4D; - function LogWriteWarning(const AMsg: string): IMultiLog4D; - function LogWriteError(const AMsg: string): IMultiLog4D; - function LogWriteFatalError(const AMsg: string): IMultiLog4D; - {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - function Category(const AEventCategory: TEventCategory): IMultiLog4D; - function EventID(const AEventID: DWORD): IMultiLog4D; - function UserName(const AUserName: string): IMultiLog4D; - function FileName(const AFileName: string): IMultiLog4D; - function Output(const AOutput: TLogOutput): IMultiLog4D; - {$ENDIF} - end; -*) -implementation - -(* -{ TMultiLog4DLogger } - -constructor TMultiLog4DLogger.Create; -begin - // Obter a implementação real do logger usando a fábrica - FLoggerImpl := TLogFactory.GetLogger; - FSetup := TMultiLog4DSetup.Create(Self); -end; - -function TMultiLog4DLogger.Setup: TMultiLog4DSetup; -begin - Result := FSetup; -end; - -function TMultiLog4DLogger.LogWrite(const AMsg: string; const ALogType: TLogType): IMultiLog4D; -begin - // Delegar para a implementação específica -// if Supports(FLogger, IMultiLog4D) then -// (FLogger as IMultiLog4D).Category(AEventCategory); - - Result := Self.LogWrite(AMsg, ALogType); //FLoggerImpl.LogWrite(AMsg, ALogType); -end; - -function TMultiLog4DLogger.LogWriteInformation(const AMsg: string): IMultiLog4D; -begin - Result := FLoggerImpl.LogWriteInformation(AMsg); -end; - -function TMultiLog4DLogger.LogWriteWarning(const AMsg: string): IMultiLog4D; -begin - Result := FLoggerImpl.LogWriteWarning(AMsg); -end; - -function TMultiLog4DLogger.LogWriteError(const AMsg: string): IMultiLog4D; -begin - Result := FLoggerImpl.LogWriteError(AMsg); -end; - -function TMultiLog4DLogger.LogWriteFatalError(const AMsg: string): IMultiLog4D; -begin - Result := FLoggerImpl.LogWriteFatalError(AMsg); -end; - -{$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} -function TMultiLog4DLogger.Category(const AEventCategory: TEventCategory): IMultiLog4D; -begin - Result := FLoggerImpl.Category(AEventCategory); -end; - -function TMultiLog4DLogger.EventID(const AEventID: DWORD): IMultiLog4D; -begin - Result := FLoggerImpl.EventID(AEventID); -end; - -function TMultiLog4DLogger.UserName(const AUserName: string): IMultiLog4D; -begin - Result := FLoggerImpl.UserName(AUserName); -end; - -function TMultiLog4DLogger.FileName(const AFileName: string): IMultiLog4D; -begin - Result := FLoggerImpl.FileName(AFileName); -end; - -function TMultiLog4DLogger.Output(const AOutput: TLogOutput): IMultiLog4D; -begin - Result := FLoggerImpl.Output(AOutput); -end; -{$ENDIF} -*) -end. - - -(* -unit MultiLog4D.Logger; - -interface - -uses - System.Classes, - System.StrUtils, - System.SysUtils, - System.TypInfo, - {$IFDEF MSWINDOWS} - Winapi.Windows, - {$ENDIF} - MultiLog4D.Types, - MultiLog4D.Interfaces, - MultiLog4D.Setup; - -type - TMultiLog4DLogger = class(TInterfacedObject, IMultiLog4D) - private - FSetup: IMultiLog4DSetup; - FTag: string; - {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} - FOutput: TLogOutput; - FFileName: string; - FUserName: string; - FEventID: DWORD; - FCategory: TEventCategory; - {$ENDIF} - {$ENDIF} - public - constructor Create; - function Setup: IMultiLog4DSetup; - function LogWrite(const AMsg: string; const ALogType: TLogType): IMultiLog4D; - function LogWriteInformation(const AMsg: string): IMultiLog4D; - function LogWriteWarning(const AMsg: string): IMultiLog4D; - function LogWriteError(const AMsg: string): IMultiLog4D; - function LogWriteFatalError(const AMsg: string): IMultiLog4D; - {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} - function Category(const AEventCategory: TEventCategory): IMultiLog4D; - function EventID(const AEventID: DWORD): IMultiLog4D; - function UserName(const AUserName: string): IMultiLog4D; - function FileName(const AFileName: string): IMultiLog4D; - function Output(const AOutput: TLogOutput): IMultiLog4D; - {$ENDIF} - {$ENDIF} - end; - -implementation - -{ TMultiLog4DLogger } - -constructor TMultiLog4DLogger.Create; -begin - FSetup := TMultiLog4DSetup.Create(Self); -end; - -function TMultiLog4DLogger.Setup: IMultiLog4DSetup; -begin - Result := FSetup; -end; - -function TMultiLog4DLogger.LogWrite(const AMsg: string; const ALogType: TLogType): IMultiLog4D; -begin - - Result := Self; -end; - -function TMultiLog4DLogger.LogWriteInformation(const AMsg: string): IMultiLog4D; -begin - Result := LogWriteInformation(AMsg); //LogWrite(AMsg, TLogType.ltInformation); -end; - -function TMultiLog4DLogger.LogWriteWarning(const AMsg: string): IMultiLog4D; -begin - Result := LogWrite(AMsg, TLogType.ltWarning); -end; - -function TMultiLog4DLogger.LogWriteError(const AMsg: string): IMultiLog4D; -begin - Result := LogWrite(AMsg, TLogType.ltError); -end; - -function TMultiLog4DLogger.LogWriteFatalError(const AMsg: string): IMultiLog4D; -begin - Result := LogWrite(AMsg, TLogType.ltFatalError); -end; - - -{$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} -{$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} -function TMultiLog4DLogger.Category(const AEventCategory: TEventCategory): IMultiLog4D; -begin - FCategory := AEventCategory; - Result := Self; -end; - -function TMultiLog4DLogger.EventID(const AEventID: DWORD): IMultiLog4D; -begin - FEventID := AEventID; - Result := Self; -end; - -function TMultiLog4DLogger.UserName(const AUserName: string): IMultiLog4D; -begin - FUserName := AUserName; - Result := Self; -end; - -function TMultiLog4DLogger.FileName(const AFileName: string): IMultiLog4D; -begin - FFileName := AFileName; - Result := Self; -end; - -function TMultiLog4DLogger.Output(const AOutput: TLogOutput): IMultiLog4D; -begin - FOutput := AOutput; - Result := Self; -end; -{$ENDIF} -{$ENDIF} - -end. -*) - -(* -unit MultiLog4D.Logger; - -interface - -uses - {$IFDEF MSWINDOWS} - Winapi.Windows, - {$ENDIF} - MultiLog4D.Types, - MultiLog4D.Interfaces, - MultiLog4D.Setup; - -type - TMultiLog4DLogger = class(TInterfacedObject, IMultiLog4D) - private - FSetup: IMultiLog4DSetup; - // Campos para armazenar configurações - public - constructor Create; - function Setup: IMultiLog4DSetup; - function LogWrite(const AMsg: string; const ALogType: TLogType): IMultiLog4D; - function LogWriteInformation(const AMsg: string): IMultiLog4D; - function LogWriteWarning(const AMsg: string): IMultiLog4D; - function LogWriteError(const AMsg: string): IMultiLog4D; - function LogWriteFatalError(const AMsg: string): IMultiLog4D; - {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - function Category(const AEventCategory: TEventCategory): IMultiLog4D; - function EventID(const AEventID: DWORD): IMultiLog4D; - function UserName(const AUserName: string): IMultiLog4D; - function FileName(const AFileName: string): IMultiLog4D; - function Output(const AOutput: TLogOutput): IMultiLog4D; - {$ENDIF} - end; - -implementation - -{ TMultiLog4DLogger } - -constructor TMultiLog4DLogger.Create; -begin - FSetup := TMultiLog4DSetup.Create(Self); -end; - -function TMultiLog4DLogger.Setup: IMultiLog4DSetup; -begin - Result := FSetup; -end; - -function TMultiLog4DLogger.LogWrite(const AMsg: string; const ALogType: TLogType): IMultiLog4D; -begin - // Implementação do método - Result := Self; -end; - -function TMultiLog4DLogger.LogWriteInformation(const AMsg: string): IMultiLog4D; -begin - Result := LogWrite(AMsg, TLogType.ltInformation); -end; - -function TMultiLog4DLogger.LogWriteWarning(const AMsg: string): IMultiLog4D; -begin - Result := LogWrite(AMsg, TLogType.ltWarning); -end; - -function TMultiLog4DLogger.LogWriteError(const AMsg: string): IMultiLog4D; -begin - Result := LogWrite(AMsg, TLogType.ltError); -end; - -function TMultiLog4DLogger.LogWriteFatalError(const AMsg: string): IMultiLog4D; -begin - Result := LogWrite(AMsg, TLogType.ltFatalError); -end; - -{$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} -function TMultiLog4DLogger.Category(const AEventCategory: TEventCategory): IMultiLog4D; -begin - // Implementação do método - Result := Self; -end; - -function TMultiLog4DLogger.EventID(const AEventID: DWORD): IMultiLog4D; -begin - // Implementação do método - Result := Self; -end; - -function TMultiLog4DLogger.UserName(const AUserName: string): IMultiLog4D; -begin - // Implementação do método - Result := Self; -end; - -function TMultiLog4DLogger.FileName(const AFileName: string): IMultiLog4D; -begin - // Implementação do método - Result := Self; -end; - -function TMultiLog4DLogger.Output(const AOutput: TLogOutput): IMultiLog4D; -begin - // Implementação do método - Result := Self; -end; -{$ENDIF} - -end. -*) diff --git a/src/MultiLog4D.Posix.SysLog.pas b/src/MultiLog4D.Posix.SysLog.pas new file mode 100644 index 0000000..4853170 --- /dev/null +++ b/src/MultiLog4D.Posix.SysLog.pas @@ -0,0 +1,80 @@ +unit MultiLog4D.Posix.SysLog; + +interface + +uses + System.SysUtils, + Posix.Base; + +const // openlog() option + LOG_PID = $01; + LOG_CONS = $02; + LOG_ODELAY = $04; + LOG_NDELAY = $08; + LOG_NOWAIT = $10; + LOG_PERROR = $20; + +const // openlog() facility + LOG_KERN = 0 shl 3; + LOG_USER = 1 shl 3; + LOG_MAIL = 2 shl 3; + LOG_DAEMON = 3 shl 3; + LOG_AUTH = 4 shl 3; + LOG_SYSLOG = 5 shl 3; + LOG_LPR = 6 shl 3; + LOG_NEWS = 7 shl 3; + LOG_UUCP = 8 shl 3; + LOG_CRON = 9 shl 3; + LOG_AUTHPRIV = 10 shl 3; + LOG_FTP = 11 shl 3; + LOG_LOCAL0 = 16 shl 3; + LOG_LOCAL1 = 17 shl 3; + LOG_LOCAL2 = 18 shl 3; + LOG_LOCAL3 = 19 shl 3; + LOG_LOCAL4 = 20 shl 3; + LOG_LOCAL5 = 21 shl 3; + LOG_LOCAL6 = 22 shl 3; + LOG_LOCAL7 = 23 shl 3; + LOG_NFACILITIES = 24; + LOG_FACMASK = $03f8; + INTERNAL_NOPRI = $10; + INTERNAL_MARK = LOG_NFACILITIES shl 3; + +const // setlogmask() level + LOG_EMERG = 0; + LOG_ALERT = 1; + LOG_CRIT = 2; + LOG_ERR = 3; + LOG_WARNING = 4; + LOG_NOTICE = 5; + LOG_INFO = 6; + LOG_DEBUG = 7; + LOG_PRIMASK = $07; + +procedure closelog; cdecl; external libc name _PU + 'closelog'; +procedure openlog(ident: MarshaledAString; option: LongInt; facility: LongInt); cdecl; external libc name _PU + 'openlog'; +function setlogmask(mask: LongInt): LongInt; cdecl; external libc name _PU + 'setlogmask'; +procedure _syslog(priority: LongInt; _format: MarshaledAString; args: array of const); cdecl; external libc name _PU + 'syslog'; + +//procedure openlog2(ident: MarshaledAString; option: LongInt; facility: LongInt); cdecl; + +procedure syslog(APriority: LongInt; const AFormat: string); overload; +procedure syslog(APriority: LongInt; const AFormat: string; AArgs: array of const); overload; + +implementation + +procedure syslog(APriority: LongInt; const AFormat: string); +var + LMarshaller: TMarshaller; + str: MarshaledAString; +begin + str := LMarshaller.AsAnsi(AFormat, CP_UTF8).ToPointer; + _syslog(APriority, str, []); +end; + +procedure syslog(APriority: LongInt; const AFormat: string; AArgs: array of const); +begin + syslog(APriority, Format(AFormat, AArgs)); +end; + +end. diff --git a/src/MultiLog4D.Setup.pas b/src/MultiLog4D.Setup.pas deleted file mode 100644 index 6d4929a..0000000 --- a/src/MultiLog4D.Setup.pas +++ /dev/null @@ -1,185 +0,0 @@ -unit MultiLog4D.Setup; - -interface - -uses - {$IFDEF MSWINDOWS} - Winapi.Windows, - {$ENDIF} - MultiLog4D.Interfaces, - MultiLog4D.Types; -(* -type - TMultiLog4DSetup = class(TInterfacedObject, IMultiLog4DSetup) - private - FLogger: IMultiLog4D; - FTag: string; - {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} - FOutput: TLogOutput; - FFileName: string; - FUserName: string; - FEventID: DWORD; - FCategory: TEventCategory; - {$ENDIF} - {$ENDIF} - public - constructor Create(ALogger: IMultiLog4D); - function Tag(const ATag: string): IMultiLog4DSetup; - {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} - function Output(const AOutput: TLogOutput): IMultiLog4DSetup; - function FileName(const AFileName: string): IMultiLog4DSetup; - function UserName(const AUserName: string): IMultiLog4DSetup; - function EventID(const AEventID: DWORD): IMultiLog4DSetup; - function Category(const AEventCategory: TEventCategory): IMultiLog4DSetup; - {$ENDIF} - {$ENDIF} - function &End: IMultiLog4D; - end; -*) -implementation - -{ TMultiLog4DSetup } -(* -constructor TMultiLog4DSetup.Create(ALogger: IMultiLog4D); -begin - FLogger := ALogger; -end; - -function TMultiLog4DSetup.Tag(const ATag: string): IMultiLog4DSetup; -begin - FTag := ATag; - Result := Self; -end; - -{$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} -{$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} -function TMultiLog4DSetup.Output(const AOutput: TLogOutput): IMultiLog4DSetup; -begin - FOutput := AOutput; - Result := Self; -end; - -function TMultiLog4DSetup.FileName(const AFileName: string): IMultiLog4DSetup; -begin - FFileName := AFileName; - Result := Self; -end; - -function TMultiLog4DSetup.UserName(const AUserName: string): IMultiLog4DSetup; -begin - FUserName := AUserName; - Result := Self; -end; - -function TMultiLog4DSetup.EventID(const AEventID: DWORD): IMultiLog4DSetup; -begin - FEventID := AEventID; - Result := Self; -end; - -function TMultiLog4DSetup.Category(const AEventCategory: TEventCategory): IMultiLog4DSetup; -begin - FCategory := AEventCategory; - Result := Self; -end; -{$ENDIF} -{$ENDIF} - -function TMultiLog4DSetup.&End: IMultiLog4D; -begin - Result := FLogger; -end; -*) - -end. - -(* -unit MultiLog4D.Setup; - -interface - -uses - {$IFDEF MSWINDOWS} - Winapi.Windows, - {$ENDIF} - MultiLog4D.Interfaces, - MultiLog4D.Types; - -type - TMultiLog4DSetup = class(TInterfacedObject, IMultiLog4DSetup) - private - FLogger: IMultiLog4D; - public - constructor Create(ALogger: IMultiLog4D); - function Tag(const ATag: string): IMultiLog4DSetup; - {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} - function Output(const AOutput: TLogOutput): IMultiLog4DSetup; - function FileName(const AFileName: string): IMultiLog4DSetup; - function UserName(const AUserName: string): IMultiLog4DSetup; - function EventID(const AEventID: DWORD): IMultiLog4DSetup; - function Category(const AEventCategory: TEventCategory): IMultiLog4DSetup; - {$ENDIF} - {$ENDIF} - function &End: IMultiLog4D; - end; - -implementation - -{ TMultiLog4DSetup } - -constructor TMultiLog4DSetup.Create(ALogger: IMultiLog4D); -begin - FLogger := ALogger; -end; - -function TMultiLog4DSetup.Tag(const ATag: string): IMultiLog4DSetup; -begin - // Implementação do método - Result := Self; -end; - -{$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} -{$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} -function TMultiLog4DSetup.Output(const AOutput: TLogOutput): IMultiLog4DSetup; -begin - // Implementação do método - Result := Self; -end; - -function TMultiLog4DSetup.FileName(const AFileName: string): IMultiLog4DSetup; -begin - // Implementação do método - Result := Self; -end; - -function TMultiLog4DSetup.UserName(const AUserName: string): IMultiLog4DSetup; -begin - // Implementação do método - Result := Self; -end; - -function TMultiLog4DSetup.EventID(const AEventID: DWORD): IMultiLog4DSetup; -begin - // Implementação do método - Result := Self; -end; - -function TMultiLog4DSetup.Category(const AEventCategory: TEventCategory): IMultiLog4DSetup; -begin - // Implementação do método - Result := Self; -end; -{$ENDIF} -{$ENDIF} - -function TMultiLog4DSetup.&End: IMultiLog4D; -begin - Result := FLogger; -end; - -end. -*) - diff --git a/src/MultiLog4D.Types.pas b/src/MultiLog4D.Types.pas index d4909f6..7c82f32 100644 --- a/src/MultiLog4D.Types.pas +++ b/src/MultiLog4D.Types.pas @@ -11,7 +11,7 @@ interface TLogType = (ltInformation, ltWarning, ltError, ltFatalError); TEventCategory = (ecNone, ecApplication, ecSecurity, ecPerformance, ecError, ecWarning, ecDebug, ecTransaction, ecNetwork); - TLogOutPut = (loBoth, loConsole, loFile, loEventViewer); + TLogOutPut = (loBoth, {$IFDEF MSWINDOWS}loConsole,{$ENDIF} loFile, {$IFDEF MSWINDOWS}loEventViewer{$ENDIF}{$IFDEF LINUX}loSysLog{$ENDIF}); const EventCategoryNames: array[TEventCategory] of string = ( diff --git a/src/MultiLog4D.Util.pas b/src/MultiLog4D.Util.pas index d22fb99..a7ba542 100644 --- a/src/MultiLog4D.Util.pas +++ b/src/MultiLog4D.Util.pas @@ -8,11 +8,6 @@ interface {$IFDEF MSWINDOWS} Winapi.Windows, {$ENDIF} - {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} - - {$ENDIF} - {$ENDIF} MultiLog4D.Interfaces, MultiLog4D.Factory, MultiLog4D.Types; @@ -25,11 +20,13 @@ TMultiLog4DUtil = class public class function Logger: IMultiLog4D; static; {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} + {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_EVENTVIEWER)} class procedure SetCategory(const AEventCategory: TEventCategory); static; class procedure SetEventID(const AEventID: {$IFDEF MSWINDOWS}DWORD{$ENDIF}{$IFDEF LINUX}LONGWORD{$ENDIF}); static; class procedure SetUserName(const AUserName: string); static; + {$IFNDEF LINUX} class procedure SetFileName(const AFileName: string); static; + {$ENDIF} {$ENDIF} {$ENDIF} end; @@ -47,7 +44,7 @@ class function TMultiLog4DUtil.Logger: IMultiLog4D; end; {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} -{$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} +{$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_EVENTVIEWER)} class procedure TMultiLog4DUtil.SetCategory(const AEventCategory: TEventCategory); begin if Supports(FLogger, IMultiLog4D) then @@ -66,6 +63,7 @@ class procedure TMultiLog4DUtil.SetUserName(const AUserName: string); (FLogger as IMultiLog4D).UserName(AUserName); end; +{$IFNDEF LINUX} class procedure TMultiLog4DUtil.SetFileName(const AFileName: string); begin if Supports(FLogger, IMultiLog4D) then @@ -74,6 +72,7 @@ class procedure TMultiLog4DUtil.SetFileName(const AFileName: string); end; {$ENDIF} {$ENDIF} +{$ENDIF} initialization diff --git a/src/MultiLog4D.Windows.Console.pas b/src/MultiLog4D.Windows.Console.pas index 69430d6..fae4fbb 100644 --- a/src/MultiLog4D.Windows.Console.pas +++ b/src/MultiLog4D.Windows.Console.pas @@ -25,7 +25,7 @@ TMultiLog4DWindowsConsole = class(TMultiLog4DBase) public constructor Create; {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} + {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_EVENTVIEWER)} function Category(const AEventCategory: TEventCategory): IMultiLog4D; override; function EventID(const AEventID: DWORD): IMultiLog4D; override; function UserName(const AUserName: string): IMultiLog4D; override; @@ -76,7 +76,7 @@ procedure TMultiLog4DWindowsConsole.LogWriteToDestination(const AMsg: string; co end; {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} -{$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} +{$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_EVENTVIEWER)} function TMultiLog4DWindowsConsole.Category(const AEventCategory: TEventCategory): IMultiLog4D; begin FEventCategory := AEventCategory; diff --git a/src/MultiLog4D.Windows.Files.pas b/src/MultiLog4D.Windows.Files.pas index 768e057..03ad4ad 100644 --- a/src/MultiLog4D.Windows.Files.pas +++ b/src/MultiLog4D.Windows.Files.pas @@ -24,7 +24,7 @@ TMultiLog4DWindowsFile = class(TMultiLog4DBase) public constructor Create(const AFileName: string); {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} + {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_EVENTVIEWER)} function Category(const AEventCategory: TEventCategory): IMultiLog4D; override; function EventID(const AEventID: DWORD): IMultiLog4D; override; function UserName(const AUserName: string): IMultiLog4D; override; @@ -61,7 +61,7 @@ procedure TMultiLog4DWindowsFile.LogWriteToDestination(const AMsg: string; const end; {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} -{$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} +{$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_EVENTVIEWER)} function TMultiLog4DWindowsFile.Category(const AEventCategory: TEventCategory): IMultiLog4D; begin FEventCategory := AEventCategory; diff --git a/src/MultiLog4D.Windows.Services.pas b/src/MultiLog4D.Windows.Services.pas index 0112fbf..a408e2e 100644 --- a/src/MultiLog4D.Windows.Services.pas +++ b/src/MultiLog4D.Windows.Services.pas @@ -22,7 +22,7 @@ TMultiLog4DWindowsServices = class(TMultiLog4DBase) public constructor Create; {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} - {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} + {$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_EVENTVIEWER)} function Category(const AEventCategory: TEventCategory): IMultiLog4D; override; function EventID(const AEventID: DWORD): IMultiLog4D; override; function UserName(const AUserName: string): IMultiLog4D; override; @@ -106,7 +106,7 @@ procedure TMultiLog4DWindowsServices.LogWriteToDestination(const AMsg: string; c end; {$IF NOT DEFINED(ANDROID) AND NOT DEFINED(IOS)} -{$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_SERVICE)} +{$IF DEFINED(ML4D_DESKTOP) OR DEFINED(ML4D_CONSOLE) OR DEFINED(ML4D_EVENTVIEWER)} function TMultiLog4DWindowsServices.Category(const AEventCategory: TEventCategory): IMultiLog4D; begin FEventCategory := AEventCategory;