Giter Site home page Giter Site logo

lualogging-definitions's Introduction

LuaLogging Definitions

Definition files for lunarmodules/lualogging 1.8.2 to use with LuaLS/lua-language-server. The annotations have been manually re-written directly from the docs and source code to be parsable by the LSP.

The library should be pretty much fully supported. There's not much weird stuff that's hard to emulate.

Usage

For manual installation, add these settings to your settings.json file.

// settings.json
{
  "Lua.workspace.library": [
    // path to wherever this repo was cloned to
    "path/to/this/repo"
    // e.g. on Windows, "$USERPROFILE/Documents/LuaEnvironments/lualogging"
  ],
  "Lua.runtime.plugin": "path/to/this/repo/plugin.lua"
}

The plugin is used to catch appender require calls and add them to the main module's definition, so that examples like this work fine.

require("logging.console")
local logging = require("logging")

local logger = logging.console()

However, there are ways to write your code that ignore this quirk, so the plugin isn't necessary unless you're working with the examples.

-- variant 1
local logging = require("logging") 
local console = require("logging.console")

local logger = console()

-- variant 2
local logging = require("logging")
logging.console = require("logging.console")

local logger = logging.console()

Types

The types provided by this library are, exhaustively:

  • Classes, given as logging.[CLASS NAME]. Every class is listed below:
Name Module Source
logging logging
logging.loglevel logging
logging.logger logging
logging.osdate logging
logging.console logging.console
logging.console.options logging.console
logging.email logging.email
logging.email.options logging.email
logging.email.options.headers logging.email
logging.file logging.file
logging.file.options logging.file
logging.rolling_file logging.rolling_file
logging.rolling_file.options logging.rolling_file
logging.rsyslog logging.rsyslog
logging.rsyslog.options logging.rsyslog
logging.rsyslog.facility logging.rsyslog
logging.socket logging.socket
logging.socket.options logging.socket
logging.sql logging.sql
logging.sql.options logging.sql
  • Aliases, given as logging.[ALIAS NAME]. Every alias is listed below:
Name Module Source
logging.append logging

lualogging-definitions's People

Contributors

goldenstein64 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.