Skip to content

Commit

Permalink
📝 Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
v20100v committed Dec 12, 2024
1 parent 0b234fa commit 6a50e2b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ Public Sub howto_use_loggerConsoleVBA()
Logger.info "User 'UltraVomit' has logged in successfully."
Logger.notice "Process completed successfully with minor issues."
Logger.warning "The user 'Beetlejuice' should not be called more than 3 times."
Logger.Error "An error occurred when the user 'DeadRobotZombieCopFromOuterspace' tried to read the dashboard file."
Logger.error "An error occurred when the user 'DeadRobotZombieCopFromOuterspace' tried to read the dashboard file."
Logger.critical "System is in an unstable state. Unable to authenticate the user 'Skjalg Skagen'."
Logger.alert "Action required: unable to generate the dashboard."
Logger.emergency "A critical failure occurred in the application for moving files."
End Sub
```

You can see result in the VBA console (a.k.a. Excel's Immediate Windows).

![VBAMonologger-output-VBAConsole.png](docs/src/assets/VBAMonologger-output-VBAConsole.png)

> Note: If the console is not visible in Excel Visual basidc IDE, go to the menu and select *View > Immediate Window*. Alternatively, you can press <kbd>Ctrl</kbd> + <kbd>G</kbd> to quickly open it.

### Log output to file

Expand Down Expand Up @@ -90,7 +94,7 @@ End Sub
![VBAMonologger-output-WindowsConsole.png](docs/src/assets/VBAMonologger-output-WindowsConsole.png)


### Log output with placeholders and context data
### Use placeholders with context data into log message

By default, all loggers create with the factory includes the pre-processors placeholders. It is used to dynamically insert specific contextual data into logging messages, allowing for more detailed and contextualized log records. You can choose to display (or not) the context data, either on a single line or across multiple lines, formatted as pretty JSON with whitespace.

Expand Down
Binary file modified docs/src/assets/VBAMonologger-output-VBAConsole.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ social:
title: VBA Monologger documentation, an advanced and flexible logging solution for VBA.
hide:
- footer
- feedback
---

Welcome to VBA Monologger documentation.
VBA Monologger is an advanced and flexible logging solution for VBA (*Visual Basic for Applications*) ecosystem. It is largely inspired by the [Monolog](https://github.com/Seldaek/monolog) library in PHP, which itself is inspired by the [Logbook](https://logbook.readthedocs.io/en/stable/) library in Python.
Binary file modified examples/example.xlsm
Binary file not shown.
Binary file removed src/~$6i_VBA-Monologger.xlam
Binary file not shown.

0 comments on commit 6a50e2b

Please sign in to comment.