Coder Social home page Coder Social logo

jlog's Introduction

jlog CI Maven Central

The Jefferson Lab Java Logbook API for programmatic access to the logbook server.



Install

This library requires a Java 8+ JVM and standard library at run time.

You can obtain the library jar file from the Maven Central repository directly or from a Maven friendly build tool with the following coordinates (Gradle example shown):

implementation 'org.jlab:jlog:<version>'

Check the Release Notes to see what has changed in each version.

API

Javadocs

Example

import org.jlab.jlog.LogEntry;
import org.jlab.jlog.exception.LogException;

public class HelloWorldDemo {
    public static void main(String[] args) throws LogException {
        LogEntry entry = new LogEntry("Hello World", "TLOG");
        
        long lognumber = entry.submitNow();
        
        System.out.println("Successfully submitted log entry number: " + lognumber);
    }
}

Configure

Properties

The default configuration properties are located in jlog-default.properties. You can override them by creating your own jlog.properties and including it in your home directory. Or you can programmatically set properties within a Java application using Library.setConfiguration().

Authentication

In order to interact with the logbook server users must authenticate. This is done using a logbook server client certificate, which is assumed to be located in the user's home directory in a file named .elogcert. You can override the location of the certificate with LogEntry.setClientCertificatePath().

Build

This project is built with Java 17 (compiled to Java 8 bytecode), and uses the Gradle 7 build tool to automatically download dependencies and build the project from source:

git clone https://github.com/JeffersonLab/jlog
cd jlog
gradlew build

Note: If you do not already have Gradle installed, it will be installed automatically by the wrapper script included in the source

Note for JLab On-Site Users: Jefferson Lab has an intercepting proxy

Release

  1. Bump the version number in the build.gradle file and commit and push to GitHub (using Semantic Versioning).
  2. Create a new release on the GitHub Releases page corresponding to the version in build.gradle (Enumerate changes and link issues).
  3. A new artifact should be automatically published to maven central when a new release is published on GitHub, however if something goes wrong you can also manually run the Publish to Maven Central GitHub Action. See Gradle Publish Notes
  4. Update javadocs by copying them from build dir into gh-pages branch and updating index.html (commit, push). This should occur automatically via Publish to gh-pages GitHub Action.

See Also

jlog's People

Contributors

slominskir avatar dub357 avatar

Watchers

James Cloos avatar  avatar Wesley Moore avatar  avatar Theo avatar  avatar

Forkers

dub357

jlog's Issues

Test with JRE 17 on RHEL9

TLS key length requirements continue to get tighter and an issue was observed with short client keys with the C++ sister project. We should do some testing.

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.