How to use oni-core-logging - 10 common examples

To help you get started, we’ve selected a few oni-core-logging examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github onivim / oni / browser / src / Services / Configuration / UserConfiguration.ts View on Github external
export const getUserConfigFolderPath = (): string => {
    const configFileFromEnv = process.env["ONI_CONFIG_FILE"] as string // tslint:disable-line
    Log.info("$env:ONI_CONFIG_FILE: " + configFileFromEnv)

    if (configFileFromEnv) {
        const configDir = path.dirname(configFileFromEnv)
        Log.info("getUserConfigFolderPath - path overridden by environment variable:  " + configDir)
        return configDir
    }

    return Platform.isWindows()
        ? path.join(Platform.getUserHome(), "oni")
        : path.join(Platform.getUserHome(), ".config/oni") // XDG-compliant
}
github onivim / oni / browser / src / Editor / OniEditor / OniEditor.tsx View on Github external
public async init(filesToOpen: string[]): Promise {
        Log.info("[OniEditor::init] Called with filesToOpen: " + filesToOpen)

        return this._neovimEditor.init(filesToOpen)
    }
github onivim / oni / browser / src / Editor / NeovimEditor / NeovimEditor.tsx View on Github external
public async init(
        filesToOpen: string[],
        startOptions?: Partial,
    ): Promise {
        Log.info("[NeovimEditor::init] Called with filesToOpen: " + filesToOpen)
        const defaultOptions: INeovimStartOptions = {
            runtimePaths: this._pluginManager.getAllRuntimePaths(),
            transport: this._configuration.getValue("experimental.neovim.transport"),
            neovimPath: this._configuration.getValue("debug.neovimPath"),
            loadInitVim: this._configuration.getValue("oni.loadInitVim"),
            useDefaultConfig: this._configuration.getValue("oni.useDefaultConfig"),
        }

        const combinedOptions = {
            ...defaultOptions,
            ...startOptions,
        }

        await this._neovimInstance.start(combinedOptions)

        if (this._errorInitializing) {
github onivim / oni / browser / src / Editor / OniEditor / OniEditor.tsx View on Github external
public leave(): void {
        Log.info("[OniEditor::leave]")
        this._neovimEditor.leave()
    }
github onivim / oni / browser / src / Editor / NeovimEditor / NeovimEditor.tsx View on Github external
public leave(): void {
        Log.info("[NeovimEditor::leave]")
        this._actions.setHasFocus(false)
        this._commands.deactivate()
        this._neovimInstance.autoCommands.executeAutoCommand("FocusLost")
    }
github onivim / oni / browser / src / Services / Snippets / SnippetManager.ts View on Github external
private _cleanupAfterSession(): void {
        Log.info("[SnippetManager::cancel]")
        this._disposables.forEach(d => d.dispose())
        this._disposables = []
        this._activeSession = null
    }
}
github onivim / oni / browser / src / Editor / NeovimEditor / NeovimEditor.tsx View on Github external
public enter(): void {
        Log.info("[NeovimEditor::enter]")
        this._onEnterEvent.dispatch()
        this._actions.setHasFocus(true)
        this._commands.activate()

        this._neovimInstance.autoCommands.executeAutoCommand("FocusGained")
        this.checkAutoRead()

        if (this.activeBuffer) {
            this.notifyBufferEnter(this.activeBuffer)
        }
    }
github onivim / oni / browser / src / Services / Language / LanguageClientProcess.ts View on Github external
private _end(): void {
        Log.info("[LanguageClientProcess] Ending language server session")

        if (this._connection) {
            this._connection.dispose()
            this._connection = null
        }

        if (this._process) {
            this._process.kill()
            this._process = null
        }
    }
}
github onivim / oni / browser / src / Services / Notifications / index.ts View on Github external
const updateFromConfiguration = () => {
        const areNotificationsEnabled = configuration.getValue("notifications.enabled")
        Log.info("[Notifications] Setting enabled: " + areNotificationsEnabled)
        areNotificationsEnabled ? _notifications.enable() : _notifications.disable()
    }
github onivim / oni / browser / src / Services / Configuration / Configuration.ts View on Github external
public addConfigurationFile(filePath: string): void {
        Log.info("[Configuration] Adding file: " + filePath)
        const fp = new FileConfigurationProvider(filePath)
        this.addConfigurationProvider(fp)
        this._fileToProvider[filePath] = fp
    }

oni-core-logging

Simple logging utilities used across Oni

MIT
Latest version published 7 years ago

Package Health Score

42 / 100
Full package analysis

Popular oni-core-logging functions

Similar packages