Skip to content

Commit

Permalink
Merge pull request #514 from CBATeam/shorten-log-messages
Browse files Browse the repository at this point in the history
remove 'File:' and 'Line:' from log macros/functions
  • Loading branch information
Killswitch00 authored Oct 1, 2016
2 parents fc3156b + 6c8fb44 commit 9b6d238
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion addons/diagnostic/fnc_error.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ params [
_prefix = toUpper _prefix;

// RPT log
diag_log text format ["[%1] (%2) ERROR: %3 File: %4 Line: %5", _prefix, _component, _title, _file, _lineNum];
diag_log text format ["[%1] (%2) ERROR: %3 %4:%5", _prefix, _component, _title, _file, _lineNum];

private _lines = [_message, "\n"] call CBA_fnc_split;

Expand Down
4 changes: 1 addition & 3 deletions addons/main/script_macros_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Macros: DEBUG_MODE_x
#define LOG_SYS(LEVEL,MESSAGE) LOG_SYS_FORMAT(LEVEL,MESSAGE) call CBA_fnc_log
#endif

#define LOG_SYS_FILELINENUMBERS(LEVEL,MESSAGE) LOG_SYS(LEVEL,format [ARR_4('%1 File: %2 Line: %3',MESSAGE,__FILE__,__LINE__ + 1)])
#define LOG_SYS_FILELINENUMBERS(LEVEL,MESSAGE) LOG_SYS(LEVEL,format [ARR_4('%1 %2:%3',MESSAGE,__FILE__,__LINE__ + 1)])

/* -------------------------------------------
Macro: LOG()
Expand Down Expand Up @@ -287,8 +287,6 @@ Macro: ERROR_WITH_TITLE()
The title can be specified (in <ERROR()> the heading is always just "ERROR")
Newlines (\n) in the MESSAGE will be put on separate lines.
TODO: Popup an error dialog & throw an exception.
Parameters:
TITLE - Title of error message <STRING>
MESSAGE - Body of error message <STRING>
Expand Down

0 comments on commit 9b6d238

Please sign in to comment.