Skip to content

Commit

Permalink
Merge pull request #26 from adrianosantostreina/BugNSLogRepetindo
Browse files Browse the repository at this point in the history
Correções
  • Loading branch information
adrianosantostreina authored Aug 2, 2024
2 parents 466fbdb + a948e07 commit 1346ade
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 13 deletions.
15 changes: 14 additions & 1 deletion Samples/# Default Sample/DefaultSample.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
<FrameworkType>FMX</FrameworkType>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Debug</Config>
<Platform Condition="'$(Platform)'==''">iOSSimARM64</Platform>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<TargetedPlatforms>693267</TargetedPlatforms>
<AppType>Application</AppType>
<MainSource>DefaultSample.dpr</MainSource>
<ProjectName Condition="'$(ProjectName)'==''">DefaultSample</ProjectName>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base>
Expand Down Expand Up @@ -256,6 +257,7 @@
<iPad_SpotLight80>$(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png</iPad_SpotLight80>
<iPad_Setting58>$(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png</iPad_Setting58>
<iPad_Notification40>$(BDS)\bin\Artwork\iOS\iPad\FM_NotificationIcon_40x40.png</iPad_Notification40>
<DCC_UnitSearchPath>..\..\src\;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_iOSSimARM64)'!=''">
<DCC_UsePackage>fmx;DbxCommonDriver;bindengine;IndyIPCommon;emsclient;IndyProtocols;dbxcds;FireDACSqliteDriver;DbxClientDriver;soapmidas;dbexpress;inet;FireDACDBXDriver;CustomIPTransport;IndySystem;FireDACCommon;bindcompdbx;rtl;DBXSqliteDriver;DataSnapFireDAC;FireDAC;xmlrtl;dsnap;DataSnapNativeClient;FireDACCommonDriver;IndyIPClient;bindcompfmx;fmxFireDAC;DataSnapCommon;fmxase;dbrtl;DBXInterBaseDriver;bindcomp;IndyCore;RESTBackendComponents;RESTComponents;IndyIPServer;dsnapxml;DataSnapClient;DataSnapProviderClient;emsclientfiredac;FireDACDSDriver;tethering;CloudService;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage)</DCC_UsePackage>
Expand Down Expand Up @@ -289,12 +291,20 @@
<VerInfo_Keys>CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple&apos;s speech recognition servers;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing the Bluetooth interface</VerInfo_Keys>
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<DCC_UnitSearchPath>..\..\src\;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
<Debugger_Launcher>/usr/X11/bin/xterm -e &quot;%debuggee%&quot;</Debugger_Launcher>
<Manifest_File>(None)</Manifest_File>
<AppDPIAwarenessMode>none</AppDPIAwarenessMode>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_OSXARM64)'!=''">
<DCC_UsePackage>DataSnapServer;fmx;DbxCommonDriver;bindengine;IndyIPCommon;FireDACCommonODBC;emsclient;IndyProtocols;dbxcds;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;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage)</DCC_UsePackage>
<VerInfo_Keys>CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple&apos;s speech recognition servers;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing the Bluetooth interface</VerInfo_Keys>
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<DCC_UnitSearchPath>..\..\src\;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
<Debugger_Launcher>/usr/X11/bin/xterm -e &quot;%debuggee%&quot;</Debugger_Launcher>
<Manifest_File>(None)</Manifest_File>
<AppDPIAwarenessMode>none</AppDPIAwarenessMode>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_UsePackage>SampleListViewMultiDetailAppearancePackage;vclwinx;DataSnapServer;ACBr_TCP;fmx;vclie;DbxCommonDriver;bindengine;IndyIPCommon;VCLRESTComponents;DBXMSSQLDriver;FireDACCommonODBC;emsclient;ACBr_OpenSSL;aurelius;appanalytics;IndyProtocols;vclx;Skia.Package.RTL;dbxcds;vcledge;ACBr_BoletoRL;DBXFirebirdDriver;dacvcl290;FireDACSqliteDriver;DbxClientDriver;soapmidas;frCoreLibrary29;dbexpress;vquery290;inet;ACBr_BoletoFPDF;vcltouch;FireDACDBXDriver;fmxdae;tmsbcl;CustomIPTransport;FireDACMSSQLDriver;C4DWizard;ACBr_NFe;IndySystem;ACBr_Diversos;BossExperts;frxe29;vclFireDAC;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;emsserverresource;pkgADRIFoodMarket;bindcompdbx;rtl;FireDACMySQLDriver;ACBr_NFeDanfeFR;frce;remotedb;DBXSqliteDriver;DBXSybaseASEDriver;ACBr_Serial;ACBr_Comum;ACBr_NFeDanfeESCPOS;vclimg;DataSnapFireDAC;unidacfmx290;inetdbxpress;FireDAC;xmlrtl;dsnap;xdata;FireDACDb2Driver;DBXOracleDriver;DBXInformixDriver;fmxobj;bindcompvclsmp;DataSnapNativeClient;frx29;DatasnapConnectorsFreePascal;FMXTMSFNCUIPackPkgDXE15;ACBr_OpenDelivery;ACBr_NFeDanfeFPDF;TMSLogging;FMXTMSFNCCorePkgDXE15;emshosting;sparkle;frxDB29;frLocalizationLibrary29;FireDACCommonDriver;sphinx;IndyIPClient;bindcompvclwinx;emsedge;bindcompfmx;crcontrols290;inetdb;FireDACASADriver;vclactnband;fmxFireDAC;FireDACInfxDriver;DBXMySQLDriver;VclSmp;DataSnapCommon;PkgBrasil4D;fmxase;DBXOdbcDriver;dbrtl;FireDACOracleDriver;Skia.Package.FMX;FireDACMSAccDriver;DataSnapIndy10ServerTransport;DataSnapConnectors;vcldsnap;DBXInterBaseDriver;FireDACMongoDBDriver;FireDACTDataDriver;Skia.Package.VCL;VCLTMSFNCUIPackPkgDXE15;vcldb;ACBr_Integrador;ACBr_PIXCD;ACBr_BoletoFR;unidacvcl290;bindcomp;dacfmx290;MobileExperts;IndyCore;RESTBackendComponents;FireDACADSDriver;MobilePermissions;RESTComponents;IndyIPServer;vcl;dsnapxml;adortl;dsnapcon;DataSnapClient;DataSnapProviderClient;dac290;DBXDb2Driver;ACBr_Boleto;emsclientfiredac;FireDACPgDriver;FireDACDSDriver;tethering;bindcompvcl;CloudService;DBXSybaseASADriver;ACBr_NFeDanfeRL;VCLTMSFNCCorePkgDXE15;soaprtl;unidac290;soapserver;FireDACIBDriver;$(DCC_UsePackage)</DCC_UsePackage>
Expand All @@ -307,6 +317,7 @@
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
<AppDPIAwarenessMode>none</AppDPIAwarenessMode>
<DCC_UnitSearchPath>..\..\src\;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<DCC_UsePackage>vclwinx;DataSnapServer;fmx;vclie;DbxCommonDriver;bindengine;IndyIPCommon;VCLRESTComponents;DBXMSSQLDriver;FireDACCommonODBC;emsclient;appanalytics;IndyProtocols;vclx;dbxcds;vcledge;DBXFirebirdDriver;FireDACSqliteDriver;DbxClientDriver;soapmidas;frCoreLibrary29;dbexpress;inet;vcltouch;FireDACDBXDriver;fmxdae;CustomIPTransport;FireDACMSSQLDriver;IndySystem;frxe29;vclFireDAC;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;emsserverresource;bindcompdbx;rtl;FireDACMySQLDriver;DBXSqliteDriver;DBXSybaseASEDriver;vclimg;DataSnapFireDAC;inetdbxpress;FireDAC;xmlrtl;dsnap;FireDACDb2Driver;DBXOracleDriver;DBXInformixDriver;fmxobj;bindcompvclsmp;DataSnapNativeClient;frx29;DatasnapConnectorsFreePascal;FMXTMSFNCUIPackPkgDXE15;FMXTMSFNCCorePkgDXE15;emshosting;frxDB29;frLocalizationLibrary29;FireDACCommonDriver;IndyIPClient;bindcompvclwinx;emsedge;bindcompfmx;inetdb;FireDACASADriver;vclactnband;fmxFireDAC;FireDACInfxDriver;DBXMySQLDriver;VclSmp;DataSnapCommon;fmxase;DBXOdbcDriver;dbrtl;FireDACOracleDriver;FireDACMSAccDriver;DataSnapIndy10ServerTransport;DataSnapConnectors;vcldsnap;DBXInterBaseDriver;FireDACMongoDBDriver;FireDACTDataDriver;Skia.Package.VCL;VCLTMSFNCUIPackPkgDXE15;vcldb;bindcomp;IndyCore;RESTBackendComponents;FireDACADSDriver;RESTComponents;IndyIPServer;vcl;dsnapxml;adortl;dsnapcon;DataSnapClient;DataSnapProviderClient;DBXDb2Driver;emsclientfiredac;FireDACPgDriver;FireDACDSDriver;tethering;bindcompvcl;CloudService;DBXSybaseASADriver;VCLTMSFNCCorePkgDXE15;soaprtl;soapserver;FireDACIBDriver;$(DCC_UsePackage)</DCC_UsePackage>
Expand All @@ -318,6 +329,8 @@
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
<DCC_UnitSearchPath>..\..\src\;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
<AppDPIAwarenessMode>none</AppDPIAwarenessMode>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
Expand Down
Binary file modified Samples/# Default Sample/DefaultSample.res
Binary file not shown.
11 changes: 7 additions & 4 deletions src/MultiLog4D.Android.pas
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ interface

Multilog4D.Base,
Multilog4D.Types,
Multilog4D.Interfaces,
Androidapi.Helpers,
Androidapi.JNI.JavaTypes,
Androidapi.JNI.Util;
Multilog4D.Interfaces
{$IFDEF ANDROID}
,Androidapi.Helpers
,Androidapi.JNI.JavaTypes
,Androidapi.JNI.Util
{$ENDIF}
;

type
TMultiLog4DAndroid = class(TMultiLog4DBase)
Expand Down
2 changes: 0 additions & 2 deletions src/MultiLog4D.Base.pas
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ TMultiLog4DBase = class(TInterfacedObject, IMultiLog4D)
private

protected
class var FCont : Integer;
class var FTag: string;
class var FTagSet: Boolean;
function GetDefaultTag: string;
Expand All @@ -44,7 +43,6 @@ function TMultiLog4DBase.GetDefaultTag: string;

function TMultiLog4DBase.Tag(const ATag: string): IMultiLog4D;
begin
FCont := 0;
if (ATag <> EmptyStr) and not FTagSet then
begin
FTag := ATag;
Expand Down
1 change: 1 addition & 0 deletions src/MultiLog4D.Factory.pas
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ implementation
{$IFDEF IOS}
MultiLog4D.IOS;
{$ENDIF}
System.Classes;

class constructor TLogFactory.Create;
begin
Expand Down
6 changes: 0 additions & 6 deletions src/MultiLog4D.iOS.pas
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ implementation

function TMultiLog4DiOS.LogWrite(const AMsg: string; const ALogType: TLogType): IMultiLog4D;
begin
NSLog(StringToID(FTag + GetLogPrefix(ltWarning) + AMsg + ' - ' + IntToStr(FCont)));
exit;
case ALogType of
ltWarning: LogWriteWarning(AMsg);
ltError: LogWriteError(AMsg);
Expand All @@ -44,7 +42,6 @@ function TMultiLog4DiOS.LogWrite(const AMsg: string; const ALogType: TLogType):

function TMultiLog4DiOS.LogWriteInformation(const AMsg: string): IMultiLog4D;
begin
exit;
{$IFDEF IOS}
NSLog(StringToID(FTag + GetLogPrefix(ltInformation) + AMsg));
{$ENDIF}
Expand All @@ -53,7 +50,6 @@ function TMultiLog4DiOS.LogWriteInformation(const AMsg: string): IMultiLog4D;

function TMultiLog4DiOS.LogWriteWarning(const AMsg: string): IMultiLog4D;
begin
exit;
{$IFDEF IOS}
NSLog(StringToID(FTag + GetLogPrefix(ltWarning) + AMsg));
{$ENDIF}
Expand All @@ -63,7 +59,6 @@ function TMultiLog4DiOS.LogWriteWarning(const AMsg: string): IMultiLog4D;

function TMultiLog4DiOS.LogWriteError(const AMsg: string): IMultiLog4D;
begin
exit;
{$IFDEF IOS}
NSLog(StringToID(FTag + GetLogPrefix(ltError) + AMsg));
{$ENDIF}
Expand All @@ -73,7 +68,6 @@ function TMultiLog4DiOS.LogWriteError(const AMsg: string): IMultiLog4D;

function TMultiLog4DiOS.LogWriteFatalError(const AMsg: string): IMultiLog4D;
begin
exit;
{$IFDEF IOS}
NSLog(StringToID(FTag + GetLogPrefix(ltFatalError) + AMsg));
{$ENDIF}
Expand Down

0 comments on commit 1346ade

Please sign in to comment.