.. role:: clio-inherited
   :class: clio-flag clio-flag-inherited


###########
ILogService
###########

.. js:class:: wvc.ILogService

   Stateless service interface for log propagation.
   
   Acts as a bridge between the web viewer and consumer code. Each call emits a ``hoops-log-service-entry`` event containing an  :js:data:`LogEntry <wvc.LogEntry>`\ . The service does not store entries — consumers are responsible for persistence, display, or forwarding.
   
   .. rubric:: Examples
   
   
   .. code-block:: typescript
   
      const logService = getService<ILogService>('LogService');
      logService.addEventListener('hoops-log-service-entry', (e) => {
        console.log(e.detail);
      });
      logService.warn('Connection unstable', { latency: 350 });
   
   
   Index
   =====
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~wvc.ILogService.serviceName`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~wvc.ILogService.debug`
   * :js:meth:`~wvc.ILogService.error`
   * :js:meth:`~wvc.ILogService.info`
   * :js:meth:`~wvc.ILogService.log`
   * :js:meth:`~wvc.ILogService.warn`
   
   



.. rst-class:: kind-group kind-properties

.. rubric:: Properties
   :class: kind-group-title


.. js:data:: wvc.ILogService.serviceName

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | serviceName: :js:data:`ServiceName <wvc.ServiceName>`
      



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: wvc.ILogService.debug

      .. rst-class:: sig-pretty-signature
      
         | debug(**message**\ : *string*\ , **context**\ : *Record*\ ): *void*
      
      Emits a debug-level log entry.
      
      **Parameters**
      
      
         **message**\ : *string*
      
      
            Human-readable debug message
      
      
         **context**\ : *Record*
      
      
            Optional structured context
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wvc.ILogService.error

      .. rst-class:: sig-pretty-signature
      
         | error(**message**\ : *string*\ , **context**\ : *Record*\ ): *void*
      
      Emits an error-level log entry.
      
      **Parameters**
      
      
         **message**\ : *string*
      
      
            Human-readable error message
      
      
         **context**\ : *Record*
      
      
            Optional structured context
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wvc.ILogService.info

      .. rst-class:: sig-pretty-signature
      
         | info(**message**\ : *string*\ , **context**\ : *Record*\ ): *void*
      
      Emits an info-level log entry.
      
      **Parameters**
      
      
         **message**\ : *string*
      
      
            Human-readable informational message
      
      
         **context**\ : *Record*
      
      
            Optional structured context
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wvc.ILogService.log

      .. rst-class:: sig-pretty-signature
      
         | log(**entry**\ : *Omit*\ ): *void*
      
      Emits a log entry with the given level, message, and optional context.
      
      **Parameters**
      
      
         **entry**\ : *Omit*
      
      
            Log entry without the timestamp (added automatically)
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wvc.ILogService.warn

      .. rst-class:: sig-pretty-signature
      
         | warn(**message**\ : *string*\ , **context**\ : *Record*\ ): *void*
      
      Emits a warn-level log entry.
      
      **Parameters**
      
      
         **message**\ : *string*
      
      
            Human-readable warning message
      
      
         **context**\ : *Record*
      
      
            Optional structured context
      
      
      
      **Returns**\ : *void*
      




