|
| 1 | +LogiBoard Integration |
| 2 | +===================== |
| 3 | + |
| 4 | +The ``LogiBoard`` in the ``django_logging`` package provides an interface for uploading, extracting, and exploring log files that have been zipped and shared via email. This allows for easier log management. |
| 5 | + |
| 6 | +.. note:: |
| 7 | + |
| 8 | + **Superuser Access Only**: Only superusers have access to the LogiBoard URL. If accessed by a non-superuser, they will get Access Denied page made by Lazarus. |
| 9 | + |
| 10 | +Setup Instructions |
| 11 | +------------------ |
| 12 | + |
| 13 | +1. **Add to URLs**: |
| 14 | + Include the following in your URL configuration to enable access to LogiBoard: |
| 15 | + |
| 16 | + .. code-block:: python |
| 17 | +
|
| 18 | + from django.urls import path, include |
| 19 | +
|
| 20 | +
|
| 21 | + urlpatterns = [ |
| 22 | + # ... |
| 23 | + path("django-logging/", include("django_logging.urls")), |
| 24 | + # ... |
| 25 | + ] |
| 26 | +
|
| 27 | +LogiBoard will be accessible at the following link in your project after setting it up: |
| 28 | + ``/django-logging/log-iboard/`` |
| 29 | + |
| 30 | +2. **Static Files**: |
| 31 | + Run the following command to collect and prepare the static files necessary for LogiBoard's interface: |
| 32 | + |
| 33 | + .. code-block:: bash |
| 34 | +
|
| 35 | + python manage.py collectstatic |
| 36 | +
|
| 37 | + The `collectstatic` command is required to gather and serve static assets (such as JavaScript, CSS, and images) used by LogiBoard. This ensures the front-end of the log upload and browsing interface works correctly. |
| 38 | + |
| 39 | +3. **Enable LogiBoard**: |
| 40 | + In your settings file, ensure the following setting is added under ``DJANGO_LOGGING``: |
| 41 | + |
| 42 | + .. code-block:: python |
| 43 | +
|
| 44 | + DJANGO_LOGGING = { |
| 45 | + # ... |
| 46 | + "INCLUDE_LOG_iBOARD": True, |
| 47 | + # ... |
| 48 | + } |
| 49 | +
|
| 50 | + This setting ensures that LogiBoard is available in your project. |
| 51 | + |
| 52 | + |
| 53 | +Using LogiBoard |
| 54 | +--------------- |
| 55 | + |
| 56 | +Logiboard is designed to help administrators easily review log files that have been zipped and sent via email (generated by the ``send_logs`` management command). This is particularly useful for remotely retrieving log files from production systems or shared environments. |
| 57 | + |
| 58 | +- **Access Logiboard**: Go to the link ``/django-logging/log-iboard/`` in your project to open the LogiBoard interface. |
| 59 | +- **Upload ZIP Files**: Click the upload icon or drag and drop ZIP files into the upload area. Only ZIP files are supported for upload. |
| 60 | +- **Explore Log Files**: After uploading, Logiboard automatically extracts the log files and displays their structure. You can browse through directories and open log files in supported formats, such as ``.log``, ``.txt``, ``.json``, and ``.xml``. |
| 61 | +- **Upload New Files**: Once you're done reviewing, click the "Send Another" button to upload and explore more logs. |
| 62 | + |
| 63 | +LogiBoard makes it simple to manage and review logs, ensuring you can quickly access and analyze critical log data. |
0 commit comments