libLogit

Starter Project Guides

This page gives the shortest practical setup path for each v1 Alpha MVP language. The goal is not to show every feature. The goal is to help a new developer go from “I want libLogit in this project” to “I have a working LOGIT writing logs” with as little friction as possible.

Shared Starter Outcome

Every starter guide is aiming for the same outcome:

  1. install or reference the SDK
  2. create a blank LOGIT
  3. set outputDirectory or localPath
  4. set level
  5. write one log event

That is the Beta minimum that has to feel easy.

Python

Install

git clone https://github.com/asparks1987/libLogit.git
cd libLogit
python -m pip install -e .

Minimal app

from liblogit import DEBUG, INFO, LOGIT, ENDL

LogIT = LOGIT()
LogIT.outputDirectory = "logs"
LogIT.level = DEBUG

LogIT(INFO) << "service started" << ENDL

Example file

C++

Build/install

cmake -S . -B build/liblogit -DCMAKE_BUILD_TYPE=Release
cmake --build build/liblogit
cmake --install build/liblogit --prefix /path/to/liblogit-install

Minimal app

#include <liblogit/logit.hpp>

int main() {
    auto LogIT = liblogit::LOGIT{};
    LogIT.outputDirectory = "logs";
    LogIT.level = liblogit::Level::DEBUG;

    LogIT(liblogit::Level::INFO) << "service started";
}

Example file

C

Build/install

Use the same CMake install flow as C++ and link libLogit::c in the consumer project.

Minimal app

#include <liblogit/logit.h>

int main(void) {
    liblogit_logit LogIT = liblogit_logit_default();
    liblogit_logit_set_output_directory(&LogIT, "logs");
    liblogit_logit_set_level(&LogIT, LIBLOGIT_DEBUG);

    liblogit_builder builder = liblogit_logit_at(&LogIT, LIBLOGIT_INFO);
    liblogit_builder_append(&builder, "service started");
    liblogit_builder_commit(&builder);
    return 0;
}

Example file

C#

Current route

Use the source tree or NuGet artifact work in this repository while the public package publication story is still Beta-track.

Minimal app

using LibLogit;

var LogIT = new Logit();
LogIT.OutputDirectory = "logs";
LogIT.Level = Level.Debug;

LogIT.At(Level.Info).Append("service started").Commit();

Example file

Java

Current route

Use the source tree or Maven artifact work in this repository while published consumer coordinates are still Beta-track.

Minimal app

import dev.liblogit.Logit;

class App {
    public static void main(String[] args) {
        Logit LogIT = new Logit();
        LogIT.setOutputDirectory("logs");
        LogIT.level = Logit.Level.DEBUG;

        LogIT.at(Logit.Level.INFO).append("service started").commit();
    }
}

Example file

JavaScript

Current route

Repo-local source usage today:

const { LOGIT, levels } = require("../../languages/javascript/src/liblogit");

Beta target package route:

npm install @liblogit/liblogit

Minimal app

const { LOGIT, levels } = require("../../languages/javascript/src/liblogit");

const LogIT = new LOGIT();
LogIT.outputDirectory = "logs";
LogIT.level = levels.DEBUG;

LogIT.at(levels.INFO).append("service started").commit();

Example file

Go

Current route

Use the module source in this repository:

import "github.com/asparks1987/liblogit/languages/go/liblogit"

Minimal app

package main

import "github.com/asparks1987/liblogit/languages/go/liblogit"

func main() {
    LogIT := liblogit.New()
    LogIT.SetOutputDirectory("logs")
    LogIT.Level = liblogit.Debug

    _ = LogIT.At(liblogit.Info).Append("service started").Commit()
}

Example file

Kotlin

Current route

Use the Kotlin facade against the Java binding while the Kotlin-first package story continues to harden.

Minimal app

import dev.liblogit.KotlinLogit

fun main() {
    val LogIT = KotlinLogit()
    LogIT.outputDirectory = "logs"
    LogIT.level = "debug"

    (LogIT.at("info") shl "service started").commit()
}

Example file

Suggested Evaluation Order

If you are evaluating whether libLogit is real enough for your use case:

  1. start with getting started
  2. use this page for your target language
  3. compare your language in the language matrix
  4. check install and package status
  5. read known limitations

Product Reality Check

These starter guides are intentionally minimal. They prove the portable LOGIT pattern. They do not claim that every binding has full advanced feature parity today.

That is why the Beta docs also keep a separate: