Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

align CBA debug/warning/error messages to ACE versions #466

Merged
merged 1 commit into from Aug 19, 2016

Conversation

Projects
None yet
3 participants
@commy2
Copy link
Contributor

commented Aug 16, 2016

When merged this pull request will:

  • This PR will align the format of the CBA logging macros (LOG(), WARNING(), ERROR(), TRACE()) to the format used ACE
  • streamline CBA_fnc_log and CBA_fnc_error
  • adds INFO() macro that does not print file and line number (meant for end user)

All messages will be displayed as:
[<PREFIX>] (<COMPONENT>) <LEVEL>: <MESSAGE> File: <FILE_PATH> Line: <LINE_NUMBER>

    INFO("my info message");
    LOG("my log message");
    WARNING("my warning message");
    ERROR("my error message");
    MESSAGE_WITH_TITLE("CUSTOM","my custom message");
    ERROR_WITH_TITLE("my error","line1\nline2\nline3");

->

[CBA] (diagnostic) INFO: my info message
[CBA] (diagnostic) LOG: my log message File: x\cba\addons\diagnostic\XEH_preInit.sqf Line: 39
[CBA] (diagnostic) WARNING: my warning message File: x\cba\addons\diagnostic\XEH_preInit.sqf Line: 40
[CBA] (diagnostic) ERROR: my error message File: x\cba\addons\diagnostic\XEH_preInit.sqf Line: 41
[CBA] (diagnostic) CUSTOM: my custom message File: x\cba\addons\diagnostic\XEH_preInit.sqf Line: 42
[CBA] (diagnostic) ERROR: my error File: x\cba\addons\diagnostic\XEH_preInit.sqf Line: 42
            line1
            line2
            line3
  • adds error pop up to CBA_fnc_error (ancient todo)
    http://i.imgur.com/UrqYX2V.png

@ todo:

@commy2 commy2 added this to the 3.0.1 milestone Aug 16, 2016

@commy2 commy2 changed the title allign CBA debug/warning/error messages to ACE versions align CBA debug/warning/error messages to ACE versions Aug 16, 2016

@PabstMirror

This comment has been minimized.

Copy link
Contributor

commented Aug 16, 2016

I really like making it easier to use the sync debug because you can mix TRACE with custom diag_log debugging. Without stuff will be out of order. And it is critical for logging in 3den.

These changes have problems when used with ACE's CBA_DEBUG_SYNCHRONOUS but that should be a simple fix on ace's side and won't effect any released versions.

[1925,62.664,0,"z\ace\addons\attach\XEH_clientInit.sqf:10","test trace: player=q2, getPos player=[1683.08,5599.69,0.00143909]"]

[ACE] (attach) LOG: test trace: player=q2, getPos player=[1683.08,5599.69,0.00143909] File: z\ace\addons\attach\XEH_clientInit.sqf Line: 10

Before TRACE_X macros would include diag_frameNo, ticktime and time; I don't know if we need all of that, but I do like having frameNo on TRACE.

Also we might want to change to
#define TRACE_2(MESSAGE,A,B) LOG_SYS_FILELINENUMBERS('TRACE', PFORMAT_2(MESSAGE,A,B))
so it shows TRACE instead of LOG on the message.

@commy2

This comment has been minimized.

Copy link
Contributor Author

commented Aug 16, 2016

I agree.
I removed the time stamp stuff from CBA_fnc_error and time/diag_tickTime from TRACE, because Arma already logs the machines clock time now. diag_frameNo could still be logged though.

@commy2

This comment has been minimized.

Copy link
Contributor Author

commented Aug 16, 2016

[CBA] (diagnostic) TRACE: 8037 test trace: _var1=1, _var2=2, _var3=3, _var4=4, _var5=5 File: x\cba\addons\diagnostic\XEH_preInit.sqf Line: 36

@commy2 commy2 force-pushed the log-macros branch from bd80d2d to c7617cd Aug 16, 2016

@commy2 commy2 removed the WIP label Aug 16, 2016

@Killswitch00

This comment has been minimized.

Copy link
Contributor

commented Aug 18, 2016

Needs a rebase, it seems

@commy2 commy2 force-pushed the log-macros branch from c7617cd to d9f9378 Aug 18, 2016

@commy2

This comment has been minimized.

Copy link
Contributor Author

commented Aug 18, 2016

done

@Killswitch00 Killswitch00 merged commit 589c720 into master Aug 19, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@Killswitch00 Killswitch00 deleted the log-macros branch Aug 19, 2016

@jonpas jonpas referenced this pull request Oct 5, 2016

Closed

Convert log macros to CBA #210

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.