LOGERROR: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:_LOGERROR}} The _LOGERROR statement writes a log message at the Error level with an accompanying stacktrace. {{PageSyntax}} : _LOGERROR {{Parameter|message}} {{PageParameters}} * {{Parameter|message}} is a string to write to the log output. {{PageDescription}} See the page on the Logging system for more detailed usage information. Log messages at the Error level include a stacktrace at the point of the log statement which lists the subs and...")
 
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:_LOGERROR}}
{{DISPLAYTITLE:_LOGERROR}}
The [[_LOGERROR]] statement writes a log message at the Error level with an accompanying stacktrace.
The '''_LOGERROR''' statement writes a log message at the Error level with an accompanying stacktrace.
 


{{PageSyntax}}
{{PageSyntax}}
: [[_LOGERROR]] {{Parameter|message}}
: [[_LOGERROR]] {{Parameter|message}}


{{PageParameters}}
{{PageParameters}}
* {{Parameter|message}} is a string to write to the log output.
* {{Parameter|message}} is a string to write to the log output.


{{PageDescription}}
{{PageDescription}}
See the page on the [[Logging]] system for more detailed usage information. Log messages at the Error level include a stacktrace at the point of the log statement which lists the subs and functions that were called to ultimately reach that log statement, this information can be useful for debugging errors.
* See the page on the [[Logging]] system for more detailed usage information.
* Log messages at the Error level include a stacktrace at the point of the log statement which lists the subs and functions that were called to ultimately reach that log statement, this information can be useful for debugging errors.
* Stacktraces originating from a '''_LOGERROR''' statement will only include the names of QB64 [[SUB]]s and [[FUNCTION]]s (detonated with a "(QB64)" after the name). Stacktraces originating from the QB64 internals will also include the names of C++ functions.


Stacktraces originating from a [[_LOGERROR]] statement will only include the names of QB64 SUBs and FUNCTIONs (detonated with a "(QB64)" after the name). Stacktraces originating from the QB64 internals will also include the names of C++ functions.


{{PageAvailability}}
{{PageAvailability}}
Line 23: Line 27:
File:Osx.png|'''yes'''
File:Osx.png|'''yes'''
</gallery>
</gallery>
<!-- Additional availability notes go below here -->


{{PageExamples}}
{{PageExamples}}
Line 29: Line 35:
{{Cl|_LOGERROR}} "This is an error message"
{{Cl|_LOGERROR}} "This is an error message"
{{CodeEnd}}
{{CodeEnd}}


{{PageSeeAlso}}
{{PageSeeAlso}}
* [https://qb64phoenix.com/forum/showthread.php?tid=1066 Featured in our "Keyword of the Day" series]
* [[_LOGMINLEVEL]]
* [[Keyword Reference - Alphabetical]]
* [[_LOGTRACE]], [[_LOGINFO]], [[_LOGWARN]]
* [[Keyword Reference - By usage]]
* [[Logging]]
 


{{PageNavigation}}
{{PageNavigation}}

Revision as of 12:10, 8 December 2024

The _LOGERROR statement writes a log message at the Error level with an accompanying stacktrace.


Syntax

_LOGERROR message


Parameters

  • message is a string to write to the log output.


Description

  • See the page on the Logging system for more detailed usage information.
  • Log messages at the Error level include a stacktrace at the point of the log statement which lists the subs and functions that were called to ultimately reach that log statement, this information can be useful for debugging errors.
  • Stacktraces originating from a _LOGERROR statement will only include the names of QB64 SUBs and FUNCTIONs (detonated with a "(QB64)" after the name). Stacktraces originating from the QB64 internals will also include the names of C++ functions.


Availability


Examples

Example 1
Writes a log message at the Error level
_LOGERROR "This is an error message"


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link