Quantcast
Download
(13 Kb)
Download
Updated: 04/21/20 02:45 PM
Pictures
File Info
Compatibility:
Harrowstorm (5.3.4)
Updated:04/21/20 02:45 PM
Created:02/26/19 10:22 AM
Monthly downloads:31,096
Total downloads:507,596
Favorites:510
MD5:
LibDebugLogger  Popular! (More than 5000 hits)
Version: 2.1.0
by: sirinsidiator [More]
This library provides facilities to log debug output in the background without running the risk of it showing in the chat output. It can also be very helpful in debugging issues out in the wild, since it will store the output into its saved variable file. It will automatically log information about the current client. During startup the library will use the settings overrides defined in StartUpConfig.lua, until the saved variables become available.

The log output can be inspected with the help of the DebugLogViewer add-on or the external Log Viewer.

Features

Client Information
The library will automatically log the following information about a character on login:
  • account name - in case you play with multiple accounts and that is somehow causing issues (e.g. with the saved variables)
  • character name - in case the problem occurs due to switching characters or due to some special characters in the name
  • login time - in case a problem occurs a fixed time after logging in on the character
  • client version - hope that doesn't need an explanation
  • mega server - in case of server specific issues
  • service type - steam or non-steam in case that makes a difference
  • UI type - keyboard or console UI is quite an important detail
  • ESO+ - changes how some APIs react
  • language - in case it is some localization problem
  • out of date checkbox state - good to know when someone has an issue with some add-on not loading
  • add-on count - how many are active and how many are installed
  • add-on load events - this gives information about the load order of your add-ons, the loaded add-on version and which subdirectory of the add-on folder it was loaded from

In addition it will also log Lua errors, add-on output done via the in-game debug functions d(), df() and CHAT_SYSTEM:AddMessage(), alert messages in the error category and loading screens.

Stack Traces
Usually only Lua errors contain a stack trace, but the library can be configured to log the stack trace for any message. Due to the fact that saved settings are not available until after an add-on has fully loaded, the library will default to log everything during login and switch to the configured settings afterwards.

Logger Class
Authors can create a logger object which can be used to log messages of different severity (debug/info/warning/error). Those messages will be marked with the tag passed to the logger on creation and can be easily filtered that way.

A logger can create any number of sub-instances which will use the original tag with another part appended. This can be useful for big add-ons with many components, or when some very verbose logging should be disabled for a release version without having to remove all calls to the logger.

Quick Start
Add LibDebugLogger as a dependency to your add-on manifest:
Code:
## DependsOn: LibDebugLogger>=180
Afterwards you can create a logger instance and start logging messages like so:
Lua Code:
  1. local logger = LibDebugLogger("MyAddon")
  2. logger:Debug("A debug message")
  3. logger:Info("An", "info", "message") -- multiple arguments are passed through tostring and concatenated with a space in between
  4. logger:Warn("A %s message: %d", "formatted", 123) -- if the first parameter contains formatting strings, the logger will pass all arguments through string.format instead
  5. local subLogger = logger:Create("verbose") -- this will create a separate logger with a combined tag "MyAddon/verbose".
  6. subLogger:SetEnabled(false) -- turn the new logger off
  7. subLogger:Error("An error message") -- this won't show up

Settings
The /debuglogger slash command can be used to configure what should get logged or show the current settings when no value is passed to a setting.

/debuglogger stack <on/off> - when turned on, the library will log the stack trace for the logger call. Can be very useful to figure out where a log is coming from.

/debuglogger level <d(ebug)/i(nfo)/w(arning)/e(rror)> - determines the minimum severity for logs to be stored

/debuglogger clear - will delete all stored logs

LibDebugLogger will automatically remove old logs after one day, or when the total amount surpasses 11k entries.

API Reference

LibDebugLogger.DEFAULT_SETTINGS
This constant contains the default settings for the library. The contained values should not be changed.

LibDebugLogger.TAG_INGAME
This constant contains the tag that is used to log messages that are generated by in-game methods (Lua Errors, chat debug output, alerts).

Log Levels
The values of the available log levels are stored in the following constants:
  • LibDebugLogger.LOG_LEVEL_VERBOSE = "V"
  • LibDebugLogger.LOG_LEVEL_DEBUG = "D"
  • LibDebugLogger.LOG_LEVEL_INFO = "I"
  • LibDebugLogger.LOG_LEVEL_WARNING = "W"
  • LibDebugLogger.LOG_LEVEL_ERROR = "E"
The log levels are also stored in the LibDebugLogger.LOG_LEVELS array in order of their severity.
There are also two mappings LibDebugLogger.LOG_LEVEL_TO_STRING and LibDebugLogger.STR_TO_LOG_LEVEL which can be used to convert the level values into untranslated lowercase strings and back.

The different log levels serve different purposes which authors should keep in mind when they add log output.
  • LOG_LEVEL_VERBOSE is not logged unless explicitly white-listed in the StartUpConfig.lua. It should be used for messages that are printed very often and are not of much interest to other parties.
  • LOG_LEVEL_DEBUG is not logged by default and can be used for anything that helps identifying a problem, but is not of interest during regular operation.
  • LOG_LEVEL_INFO is the default log level and should be used to log messages that give a rough idea of the flow of events during regular operation. It is also used for logging d() messages.
  • LOG_LEVEL_WARNING should be used to log messages that could potentially lead to errors. Ingame alert messages of the UI_ALERT_CATEGORY_ERROR are logged as warnings.
  • LOG_LEVEL_ERROR should usually not be used by addons, except when they suppress the ingame error message via pcall. UI errors are otherwise automatically logged with this level.

Log Entry Indices
A log entry is a numerically indexed table with the following values:
  1. raw timestamp in milliseconds
  2. human readable time
  3. occurrence count
  4. log level
  5. tag
  6. message
  7. stack trace (optional)
To use the values one can either use the unpack function and assign them to variables, or directly access them with the following index constants:
  • LibDebugLogger.ENTRY_TIME_INDEX
  • LibDebugLogger.ENTRY_FORMATTED_TIME_INDEX
  • LibDebugLogger.ENTRY_OCCURENCES_INDEX
  • LibDebugLogger.ENTRY_LEVEL_INDEX
  • LibDebugLogger.ENTRY_TAG_INDEX
  • LibDebugLogger.ENTRY_MESSAGE_INDEX
  • LibDebugLogger.ENTRY_STACK_INDEX

Create
This function will return an instance of a logger. Anything logged via that instance will automatically contain the tag for easy identification.
Code:
local logger = LibDebugLogger.Create("MyAddon")
or
Code:
local logger = LibDebugLogger:Create("MyAddon")
or
Code:
local logger = LibDebugLogger("MyAddon")
Logger:Create
Convenience method to create a new instance of the logger with a combined tag. Can be used to separate logs from different files. Anything logged via that instance will automatically contain the parent tag and the child tag separated by a slash (e.g. MyAddon/SomeFile).

Code:
local subLogger = logger:Create("SomeFile")
Logger:SetEnabled
Setter to turn this logger off, so it no longer adds anything to the log when one of its log methods is called.

Code:
logger:SetEnabled(false)
Logger:Log
Method to log messages with the passed log level. The first argument has to be a valid log level. If the second argument is a formatting string, the method will call string.format, otherwise each argument will get passed through tostring and concatenated with a space.

Code:
logger:Log(LibDebugLogger.LOG_LEVEL_DEBUG, "My formatted message: %s", "some text")
logger:Log(LibDebugLogger.LOG_LEVEL_DEBUG, "My", "combined", "message")
Logger:Verbose
Method to log messages with the verbose log level. See Log method for details on how messages are formatted. Verbose messages are not logged unless explicitly white-listed in StartUpConfig.lua.

Logger:Debug
Method to log messages with the debug log level. See Log method for details on how messages are formatted.

Logger:Info
Method to log messages with the info log level. See Log method for details on how messages are formatted.

Logger:Warn
Method to log messages with the warning log level. See Log method for details on how messages are formatted.

Logger:Error
Method to log messages with the error log level. See Log method for details on how messages are formatted.

SESSION_START_TIME
Contains the time when the client was started in milliseconds.
Code:
local sessionStartTime = LibDebugLogger.SESSION_START_TIME
UI_LOAD_START_TIME
Contains the approximate time when the UI has started loading in milliseconds. There is currently no way to get the real time, so instead this is just the time when LibDebugLogger.lua is executed first, which can be happen several seconds after the actual UI load start. Since the purpose of this function is to provide a way to discern log messages that have been created in the current UI load, this is fine.
Code:
local uiLoadStartTime = LibDebugLogger.UI_LOAD_START_TIME
IsTraceLoggingEnabled
Returns true if the library is set to capture stack traces for all messages.
Code:
local isTraceLoggingEnabled = LibDebugLogger:IsTraceLoggingEnabled()
SetTraceLoggingEnabled
Sets stack traces capturing for all messages enabled or disabled.
Code:
LibDebugLogger:SetTraceLoggingEnabled(enabled)
GetMinLogLevel
Returns the minimum log level.
Code:
local minLogLevel = LibDebugLogger:GetMinLogLevel()
SetMinLogLevel
Sets the minimum log level. Has to be one of the values in the LOG_LEVELS constant.
Code:
LibDebugLogger:SetMinLogLevel(level)
GetLog
Returns the current log table.
Code:
LibDebugLogger:GetLog()
ToggleFormattingErrors
When toggled on, the log handler will append errors in case the first argument was interpreted as a formatting string, but the subsequent call to string.format failed. This is purely for the convenience of authors who try to debug their log output and as such it doesn't have a corresponding setting.
Intended use is either via "/script d(LibDebugLogger:ToggleFormattingErrors())" or in StartUpConfig.lua
Returns the new state.
Code:
LibDebugLogger:ToggleFormattingErrors()
ClearLog
Clears the log by creating a new table.
Code:
LibDebugLogger:ClearLog()
SetBlockChatOutputEnabled
Function to block showing chat debug messages created via d(), df() or CHAT_SYSTEM:AddMessage() in the regular chat. Can be used by other add-ons that display the log content, to avoid having the messages show up twice on screen. Should be called as early as possible.
Code:
LibDebugLogger:SetBlockChatOutputEnabled(enabled)
IsBlockChatOutputEnabled
Returns true if chat debug messages are blocked from showing in chat.
Code:
local isBlocked = LibDebugLogger:IsBlockChatOutputEnabled()
CombineSplitStringIfNeeded
This method rebuilds the input string in case it has been split up to circumvent the saved variables string length limit.
Code:
input = LibDebugLogger.CombineSplitStringIfNeeded(input)
RegisterCallback
The library fires callbacks whenever the log is modified. Callbacks should be as lightweight as possible. If you plan to use expensive calls, defer the execution with zo_callLater!
Callback names are available via the LibDebugLogger.callback table and are defined in Callbacks.lua.
Code:
LibDebugLogger:RegisterCallback(callbackName, callback)
callback.LOG_CLEARED
This callback is fired when the log is wiped by the user or an addon. Passes the reference to the empty log.
Code:
LibDebugLogger:RegisterCallback(LibDebugLogger.callback.LOG_CLEARED, function(log)
    -- do something
end)
callback.LOG_PRUNED
This callback is fired after a new message was added and the log contains too many entries.
This pruning is necessary to prevent the log from growing too large to be loaded on login.
Pruning will create a new log table and the startIndex passed to the callback is the first index in the old log table that will be kept in the new log.
Code:
LibDebugLogger:RegisterCallback(LibDebugLogger.callback.LOG_PRUNED, function(startIndex)
    -- do something
end)
callback.LOG_ADDED
This callback is fired whenever a log entry is added. The entry parameter is the data as stored in the log and wasDuplicate is true when the entry had the same message, level and stack trace as the previous one and only the time and occurrence count was adjusted.
Code:
LibDebugLogger:RegisterCallback(LibDebugLogger.callback.LOG_CLEARED, function(entry, wasDuplicate)
    -- do something
end)
v2.1.0
- added new function to dynamically change the sub tag of a Logger (see Logger:SetSubTag)
- added a way to append internal formatting errors at the end of the log output (see lib:ToggleFormattingErrors)
- modified Create function so it can be called both ways (lib.Create or lib:Create)
- updated for Greymoor

v2.0.0
- reorganized code into multiple files
- disabled logging stack traces and debug log level by default during UI load
- added StartUpConfig.lua which should be used by authors to define settings used during UI load
- improved startup logging to include some additional information
- added new log level "verbose" which has to be whitelisted in StartUpConfig.lua. See API Reference for details when to use which log level.
- added new method Log() to logger which accepts a log level as first argument.
- deprecated lib.CALLBACK_* constants. Use lib.callback.* defined in callbacks.lua instead
- deprecated GetSessionStartTime. Use lib.SESSION_START_TIME instead
- deprecated GetUiLoadStartTime. Use lib.UI_LOAD_START_TIME instead

v1.1.1
- updated for chat system changes in game version 5.3.5
- fixed incorrect arguments in fallback message logging
- added assertion to prevent creating a logger without a tag, which would cause trouble for DebugLogViewer

v1.1.0
- added new APIs (see description for full details)
* settings functions
* getters for session and ui start time
* function to rebuild split log strings
* various constants, enums and variables
* callbacks for log modifications
- improved slash command settings menu
- reuse provided stack trace from Lua errors when possible
- update last logging time on identical log messages
- added chat debug output logging
- added ingame error alert logging
- added loading screens logging
- added IsLibrary flag

v1.0.2
- prune log during session before it grows too big to load on next login
- store identical messages following after one another only once and start counting afterwards
- some minor code and performance improvements

v1.0.1
- added a safeguard to ensure logging an error won't ever create more errors
- added more debug information to startup log (e.g. platform, ui, addon paths, ...)
- fixed LibDebugLogger("MyAddon") passing the wrong argument as tag
Archived Files (6)
File Name
Version
Size
Uploader
Date
2.0.0
12kB
sirinsidiator
04/10/20 11:24 AM
1.1.1
7kB
sirinsidiator
03/02/20 12:10 PM
1.1.0
7kB
sirinsidiator
06/01/19 08:23 AM
1.0.2
5kB
sirinsidiator
03/16/19 04:39 AM
1.0.1
4kB
sirinsidiator
03/04/19 12:10 PM
1.0.0
4kB
sirinsidiator
02/26/19 10:22 AM


Post A Reply Comment Options
Unread 05/27/20, 10:44 AM  
Illutian

Forum posts: 0
File comments: 37
Uploads: 0
Originally Posted by sirinsidiator
Originally Posted by Illutian
Can't completely tell...because ESO's logging is a bit wonky to me. But it appears this addon still makes call the [now depreciated] LibStub addon.


-snip-
No, it's the other way around. LibStub logs a warning to LibDebugLogger so authors can find where it is called from. In this case it's EssentialHousingTools which calls LibStub.
xD

Like I said, it's wonky. I'm use to WoW's error logging, where the first addon mentioned is the cause and the rest are all collateral damage.

Off to EHT! - And thanks for the quick response.
Report comment to moderator  
Reply With Quote
Unread 05/27/20, 10:18 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1427
File comments: 945
Uploads: 36
Originally Posted by Illutian
Can't completely tell...because ESO's logging is a bit wonky to me. But it appears this addon still makes call the [now depreciated] LibStub addon.


stack traceback:
user:/AddOns/LibDebugLogger/LogHandler.lua:185: in function 'Log'
(tail call): ?
user:/AddOns/LibStub/LibStub/LibStub.lua:47: in function 'LogDeprecationWarning'
user:/AddOns/LibStub/LibStub/LibStub.lua:85: in function 'LibStub:GetLibrary'
user:/AddOns/EssentialHousingTools/ui.lua:17930: in function 'EHT.UI.RegisterHousingHubScene'
user:/AddOns/EssentialHousingTools/handlers.lua:93: in function 'EHT.Handlers.PlayerActivated'
[C]: in function 'pcall'
user:/AddOns/EssentialHousingTools/essentialhousingtools.lua:1898: in function 'EHT.SafeCall'
user:/AddOns/EssentialHousingTools/handlers.lua:200: in function 'EHT.Handlers.OnPlayerActivated'

I'm just looking at the lines with "LibDebugLogger". - Slowly making my rounds to other addons still using LibStub.
No, it's the other way around. LibStub logs a warning to LibDebugLogger so authors can find where it is called from. In this case it's EssentialHousingTools which calls LibStub.
__________________
https://www.imperialtradingcompany.eu/ - My Addons - The Vault (Early updates and experimental projects) - My patreon - My blog
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 05/27/20, 10:13 AM  
Illutian

Forum posts: 0
File comments: 37
Uploads: 0
Can't completely tell...because ESO's logging is a bit wonky to me. But it appears this addon still makes call the [now depreciated] LibStub addon.


stack traceback:
user:/AddOns/LibDebugLogger/LogHandler.lua:185: in function 'Log'
(tail call): ?
user:/AddOns/LibStub/LibStub/LibStub.lua:47: in function 'LogDeprecationWarning'
user:/AddOns/LibStub/LibStub/LibStub.lua:85: in function 'LibStub:GetLibrary'
user:/AddOns/EssentialHousingTools/ui.lua:17930: in function 'EHT.UI.RegisterHousingHubScene'
user:/AddOns/EssentialHousingTools/handlers.lua:93: in function 'EHT.Handlers.PlayerActivated'
[C]: in function 'pcall'
user:/AddOns/EssentialHousingTools/essentialhousingtools.lua:1898: in function 'EHT.SafeCall'
user:/AddOns/EssentialHousingTools/handlers.lua:200: in function 'EHT.Handlers.OnPlayerActivated'

I'm just looking at the lines with "LibDebugLogger". - Slowly making my rounds to other addons still using LibStub.
Report comment to moderator  
Reply With Quote
Unread 05/11/20, 01:55 PM  
Aenathel
 
Aenathel's Avatar
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 22
Uploads: 3
Hi. How do I disable all logging done by this library? Even setting the log level to errors only still produces a large amount of log messages that slow down loading, which really hurts when I'm doing /reloadui during add-on development.
Report comment to moderator  
Reply With Quote
Unread 05/04/20, 08:21 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1427
File comments: 945
Uploads: 36
This error is caused by Furniture Catalog, but I hear it should already be fixed in the latest version, so make sure to update. If it's still happening, please report it in the comment section there.
__________________
https://www.imperialtradingcompany.eu/ - My Addons - The Vault (Early updates and experimental projects) - My patreon - My blog
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 05/04/20, 08:13 AM  
mlucero582

Forum posts: 0
File comments: 20
Uploads: 0
Originally Posted by Akopian Atrebates
Thanks for helping the mod community to produce better stuff. I got the following error in game the other day, and it looks like it might be related to but different from the other Invalid tag for logger errors. In the interest of assisting you in tracking down whatever is causing it, here is the error:

Invalid tag for logger
stack traceback:
[C]: in function 'assert'
user:/AddOns/LibDebugLogger/Logger.lua:16: in function 'Logger:Initialize'
|caaaaaa<Locals> self = [table:1]{} </Locals>|r
user:/AddOns/LibDebugLogger/Logger.lua:11: in function 'Logger:New'
|caaaaaa<Locals> self = [table:2]{}, obj = [table:1] </Locals>|r
(tail call): ?
(tail call): ?
user:/AddOns/FurnitureCatalogue/FurnitureCatalogue_DevUtility/ContextMenu.lua:5: in function '(main chunk)'
|caaaaaa<Locals> UNITTAG_PLAYER = "player", this = [table:3]{} </Locals>

Also, I sent this error on to Furniture Catalogue. If I can help further, let me know. I, of course, am grateful for all your efforts up until now, and will be in the future. (But if you quit today, I would still be thankful for all you have done so far). Thanks!
Getting same thing here.
Report comment to moderator  
Reply With Quote
Unread 05/02/20, 03:30 PM  
Akopian Atrebates

Forum posts: 6
File comments: 165
Uploads: 0
Thanks for helping the mod community to produce better stuff. I got the following error in game the other day, and it looks like it might be related to but different from the other Invalid tag for logger errors. In the interest of assisting you in tracking down whatever is causing it, here is the error:

Invalid tag for logger
stack traceback:
[C]: in function 'assert'
user:/AddOns/LibDebugLogger/Logger.lua:16: in function 'Logger:Initialize'
|caaaaaa<Locals> self = [table:1]{} </Locals>|r
user:/AddOns/LibDebugLogger/Logger.lua:11: in function 'Logger:New'
|caaaaaa<Locals> self = [table:2]{}, obj = [table:1] </Locals>|r
(tail call): ?
(tail call): ?
user:/AddOns/FurnitureCatalogue/FurnitureCatalogue_DevUtility/ContextMenu.lua:5: in function '(main chunk)'
|caaaaaa<Locals> UNITTAG_PLAYER = "player", this = [table:3]{} </Locals>

Also, I sent this error on to Furniture Catalogue. If I can help further, let me know. I, of course, am grateful for all your efforts up until now, and will be in the future. (But if you quit today, I would still be thankful for all you have done so far). Thanks!
Report comment to moderator  
Reply With Quote
Unread 04/16/20, 08:23 AM  
vecny.samotar
 
vecny.samotar's Avatar

Forum posts: 23
File comments: 559
Uploads: 0
error
Invalid tag for logger
stack traceback:
[C]: in function 'assert'
user:/AddOns/LibDebugLogger/Logger.lua:16: in function 'Logger:Initialize'
|caaaaaa<Locals> self = [table:1]{}, tag = [table:2]{LOG_LEVEL_VERBOSE = "V", UI_LOAD_START_TIME = 1587046866000, LOG_LEVEL_INFO = "I", ENTRY_MESSAGE_INDEX = 6, id = "LibDebugLogger", SESSION_START_TIME = 1587044703508, LOG_LEVEL_WARNING = "W", ENTRY_OCCURENCES_INDEX = 3, ENTRY_LEVEL_INDEX = 4, LOG_LEVEL_ERROR = "E", CALLBACK_LOG_PRUNED = "LogPruned", CALLBACK_LOG_CLEARED = "LogCleared", CALLBACK_LOG_ADDED = "LogAdded", TAG_INGAME = "UI", ENTRY_TAG_INDEX = 5, LOG_LEVEL_DEBUG = "D", ENTRY_TIME_INDEX = 1, ENTRY_STACK_INDEX = 7, ENTRY_FORMATTED_TIME_INDEX = 2} </Locals>|r
user:/AddOns/LibDebugLogger/Logger.lua:11: in function 'Logger:New'
|caaaaaa<Locals> self = [table:3]{}, obj = [table:1] </Locals>|r
(tail call): ?
user:/AddOns/WaypointIt/core/WaypointIt.lua:63: in function '(main chunk)'
|caaaaaa<Locals> gps = [table:4]{LIB_EVENT_STATE_CHANGED = "OnLibGPS2MeasurementChanged", suppressCount = 0}, LMP = [table:5]{MAP_PING_SET_PENDING = 2, MAP_PING_NOT_SET_PENDING = 1, MAP_PING_SET = 3, MAP_PING_NOT_SET = 0}, WaypointIt = [table:6]{}, ADDON_NAME = "WaypointIt", CODE_VERSION = "1.12.3", ROW_TYPE_ID = 1, INDEX_BUTTON = 1, INDEX_POOL_KEY = 2, INDEX_DESCRIPTOR = 3, MPLTYPE_POI = "poi", MPLTYPE_LOCATION = "loc", MPLTYPE_QUEST = "quest", MPLTYPE_AVA = "objective", MPLTYPE_KEEP = "keep", MPLTYPE_PINGS = "pings", MPLTYPE_KILL_LOCATION = "killLocation", MPLTYPE_FAST_TRAVEL_KEEP = "fastTravelKeep", MPLTYPE_FAST_TRAVEL_WAYSHRINE = "fastTravelWayshrine", MPLTYPE_FORWARD_CAMP = "forwardCamp", MPLTYPE_AVA_RESPAWN = "AvARespawn" </Locals>|r
Report comment to moderator  
Reply With Quote
Unread 04/12/20, 05:53 PM  
MurkyMais

Forum posts: 12
File comments: 41
Uploads: 0
Great. Thanks and something simple!!
Report comment to moderator  
Reply With Quote
Unread 04/12/20, 04:10 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1427
File comments: 945
Uploads: 36
Originally Posted by MurkyMais
You addon was helpful for getting logs and I appreciate your effort.

I was using this addon to help with some debugging with Baetram.


I found this error with Circonians WaypointIt .

A. Circonians WaypointIt works will all my addons when I remove LibDebugLogger
B. All my addons work with LibDebugLogger when Circonians WaypointIt to not loaded
C. Running only Circonians WaypointIt , DebugLogViewer and LibDebugLogger addons will create the message below.
It happens immediately on /reloadui or on start up

Recreate

1. Only have addons Circonians WaypointIt , DebugLogViewer and LibDebugLogger addons
2. Reloadui





Invalid tag for logger
stack traceback:
[C]: in function 'assert'
user:/AddOns/LibDebugLogger/Logger.lua:16: in function 'Logger:Initialize'
<Locals> self = [table:1]{}, tag = [table:2]{ENTRY_MESSAGE_INDEX = 6, ENTRY_TIME_INDEX = 1, LOG_LEVEL_INFO = "I", UI_LOAD_START_TIME = 1586642897000, TAG_INGAME = "UI", LOG_LEVEL_WARNING = "W", ENTRY_OCCURENCES_INDEX = 3, CALLBACK_LOG_PRUNED = "LogPruned", ENTRY_TAG_INDEX = 5, LOG_LEVEL_DEBUG = "D", LOG_LEVEL_VERBOSE = "V", SESSION_START_TIME = 1586635350849, ENTRY_STACK_INDEX = 7, id = "LibDebugLogger", CALLBACK_LOG_CLEARED = "LogCleared", ENTRY_LEVEL_INDEX = 4, LOG_LEVEL_ERROR = "E", CALLBACK_LOG_ADDED = "LogAdded", ENTRY_FORMATTED_TIME_INDEX = 2} </Locals>
user:/AddOns/LibDebugLogger/Logger.lua:11: in function 'Logger:New'
<Locals> self = [table:3]{}, obj = [table:1] </Locals>
(tail call): ?
user:/AddOns/WaypointIt/core/WaypointIt.lua:63: in function '(main chunk)'
<Locals> gps = [table:4]{suppressCount = 0, LIB_EVENT_STATE_CHANGED = "OnLibGPS2MeasurementChanged"}, LMP = [table:5]{MAP_PING_SET = 3, MAP_PING_NOT_SET = 0, MAP_PING_NOT_SET_PENDING = 1, MAP_PING_SET_PENDING = 2}, WaypointIt = [table:6]{}, ADDON_NAME = "WaypointIt", CODE_VERSION = "1.12.3", ROW_TYPE_ID = 1, INDEX_BUTTON = 1, INDEX_POOL_KEY = 2, INDEX_DESCRIPTOR = 3, MPLTYPE_POI = "poi", MPLTYPE_LOCATION = "loc", MPLTYPE_QUEST = "quest", MPLTYPE_AVA = "objective", MPLTYPE_KEEP = "keep", MPLTYPE_PINGS = "pings", MPLTYPE_KILL_LOCATION = "killLocation", MPLTYPE_FAST_TRAVEL_KEEP = "fastTravelKeep", MPLTYPE_FAST_TRAVEL_WAYSHRINE = "fastTravelWayshrine", MPLTYPE_FORWARD_CAMP = "forwardCamp", MPLTYPE_AVA_RESPAWN = "AvARespawn" </Locals>
I've had troubles with incorrect tags producing errors when viewing them in the log, so I added this check.
It looks like waypoint it is calling the library incorrectly. Line 63 in WaypointIt/core/WaypointIt.lua should either be
Lua Code:
  1. local logger = LibDebugLogger and LibDebugLogger.Create(ADDON_NAME)
or
Lua Code:
  1. local logger = LibDebugLogger and LibDebugLogger(ADDON_NAME)
But seeing this simple mistake, I'll just update the library so it will accept both LibDebugLogger.Create and LibDebugLogger:Create.
__________________
https://www.imperialtradingcompany.eu/ - My Addons - The Vault (Early updates and experimental projects) - My patreon - My blog
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 04/11/20, 04:21 PM  
MurkyMais

Forum posts: 12
File comments: 41
Uploads: 0
You addon was helpful for getting logs and I appreciate your effort.

I was using this addon to help with some debugging with Baetram.


I found this error with Circonians WaypointIt .

A. Circonians WaypointIt works will all my addons when I remove LibDebugLogger
B. All my addons work with LibDebugLogger when Circonians WaypointIt to not loaded
C. Running only Circonians WaypointIt , DebugLogViewer and LibDebugLogger addons will create the message below.
It happens immediately on /reloadui or on start up

Recreate

1. Only have addons Circonians WaypointIt , DebugLogViewer and LibDebugLogger addons
2. Reloadui





Invalid tag for logger
stack traceback:
[C]: in function 'assert'
user:/AddOns/LibDebugLogger/Logger.lua:16: in function 'Logger:Initialize'
<Locals> self = [table:1]{}, tag = [table:2]{ENTRY_MESSAGE_INDEX = 6, ENTRY_TIME_INDEX = 1, LOG_LEVEL_INFO = "I", UI_LOAD_START_TIME = 1586642897000, TAG_INGAME = "UI", LOG_LEVEL_WARNING = "W", ENTRY_OCCURENCES_INDEX = 3, CALLBACK_LOG_PRUNED = "LogPruned", ENTRY_TAG_INDEX = 5, LOG_LEVEL_DEBUG = "D", LOG_LEVEL_VERBOSE = "V", SESSION_START_TIME = 1586635350849, ENTRY_STACK_INDEX = 7, id = "LibDebugLogger", CALLBACK_LOG_CLEARED = "LogCleared", ENTRY_LEVEL_INDEX = 4, LOG_LEVEL_ERROR = "E", CALLBACK_LOG_ADDED = "LogAdded", ENTRY_FORMATTED_TIME_INDEX = 2} </Locals>
user:/AddOns/LibDebugLogger/Logger.lua:11: in function 'Logger:New'
<Locals> self = [table:3]{}, obj = [table:1] </Locals>
(tail call): ?
user:/AddOns/WaypointIt/core/WaypointIt.lua:63: in function '(main chunk)'
<Locals> gps = [table:4]{suppressCount = 0, LIB_EVENT_STATE_CHANGED = "OnLibGPS2MeasurementChanged"}, LMP = [table:5]{MAP_PING_SET = 3, MAP_PING_NOT_SET = 0, MAP_PING_NOT_SET_PENDING = 1, MAP_PING_SET_PENDING = 2}, WaypointIt = [table:6]{}, ADDON_NAME = "WaypointIt", CODE_VERSION = "1.12.3", ROW_TYPE_ID = 1, INDEX_BUTTON = 1, INDEX_POOL_KEY = 2, INDEX_DESCRIPTOR = 3, MPLTYPE_POI = "poi", MPLTYPE_LOCATION = "loc", MPLTYPE_QUEST = "quest", MPLTYPE_AVA = "objective", MPLTYPE_KEEP = "keep", MPLTYPE_PINGS = "pings", MPLTYPE_KILL_LOCATION = "killLocation", MPLTYPE_FAST_TRAVEL_KEEP = "fastTravelKeep", MPLTYPE_FAST_TRAVEL_WAYSHRINE = "fastTravelWayshrine", MPLTYPE_FORWARD_CAMP = "forwardCamp", MPLTYPE_AVA_RESPAWN = "AvARespawn" </Locals>
Report comment to moderator  
Reply With Quote
Unread 03/04/20, 02:22 PM  
Aevernia

Forum posts: 0
File comments: 3
Uploads: 0
Switching to the latest proton fixed it. I honestly didn't expect a reply at all, so thank you for getting back to me!
Report comment to moderator  
Reply With Quote
Unread 03/02/20, 03:39 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1427
File comments: 945
Uploads: 36
Re: Error

Originally Posted by Aevernia
I'm getting the same error as that other person eight months ago and there doesn't seem to be a LibDebugLogger.lua file in SavedVariables.

Please email me to follow up since I won't notice a reply on ESOUI. I would be happy to perform tests/gather information/generally act as your bug repro.

Email:
mossygreenrock [at symbol] (gmail) [dot] (com)

Error message:
user:/AddOns/LibDebugLogger/LibDebugLogger.lua:108: attempt to index a nil value
stack traceback:
user:/AddOns/LibDebugLogger/LibDebugLogger.lua:108: in function 'FormatTime'
user:/AddOns/LibDebugLogger/LibDebugLogger.lua:401: in function '(main chunk)'
Are you playing on Linux? Otherwise I don't see how this error can happen. It should be fixed in the latest version of Wine/Proton.

p.s. You will have to check back here on your own if you want help. I don't have time to chase after each and every user who wants something.
__________________
https://www.imperialtradingcompany.eu/ - My Addons - The Vault (Early updates and experimental projects) - My patreon - My blog
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 03/01/20, 10:01 AM  
Aevernia

Forum posts: 0
File comments: 3
Uploads: 0
Error

I'm getting the same error as that other person eight months ago and there doesn't seem to be a LibDebugLogger.lua file in SavedVariables.

Please email me to follow up since I won't notice a reply on ESOUI. I would be happy to perform tests/gather information/generally act as your bug repro.

Email:
mossygreenrock [at symbol] (gmail) [dot] (com)

Error message:
user:/AddOns/LibDebugLogger/LibDebugLogger.lua:108: attempt to index a nil value
stack traceback:
user:/AddOns/LibDebugLogger/LibDebugLogger.lua:108: in function 'FormatTime'
user:/AddOns/LibDebugLogger/LibDebugLogger.lua:401: in function '(main chunk)'
Report comment to moderator  
Reply With Quote
Unread 01/04/20, 05:08 PM  
Edorenel
 
Edorenel's Avatar

Forum posts: 0
File comments: 10
Uploads: 0
I was wondering, will this be updated for 5.2.5 (or for the latest version of ESO)?
__________________
“Tomorrow may be hell, but today was a good writing day, and on the good writing days nothing else matters.” - Neil Gaiman


Like my writings? Support me on Ko-Fi!
Website: Edorenel
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.