Code Monkey home page Code Monkey logo

mclogs-java's People

Contributors

julianvennen avatar konicai avatar pavog avatar therealryguy avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mclogs-java's Issues

How to use in project?

Hi, I wanted to include such an upload feature for ages now and I stumbled upon this beautiful library. But it isn't published anywhere (please do this, it's really, really simple) so I would have to copy the files.

My question is, how do I do that legally? My project is AGPL, so should I add MIT license headers or what do I have to add in order to be compliant?

Kind regards and please answer soon,
Sky

Incorrect usage info

java.lang.NullPointerException: Cannot invoke "gs.mclo.api.MclogsClient.getInstance()" because "this.client" is null
	at gs.mclo.api.response.UploadLogResponse.getUrl(UploadLogResponse.java:34)
	at me.indian.bds.mclog.McLog.sendLog(McLog.java:46)
	at me.indian.bds.BDSAutoEnable.init(BDSAutoEnable.java:125)
	at me.indian.bds.BDSAutoEnable.<init>(BDSAutoEnable.java:97)
	at me.indian.bds.BDSAutoEnable.main(BDSAutoEnable.java:101)
public class McLog {

    private final BDSAutoEnable bdsAutoEnable;
    private final Logger logger;
    private final Gson gson;
    private final MclogsClient mclogsClient;

    public McLog(final BDSAutoEnable bdsAutoEnable) {
        this.bdsAutoEnable = bdsAutoEnable;
        this.logger = bdsAutoEnable.getLogger();
        this.gson = GsonUtil.getGson();
        this.mclogsClient = new MclogsClient("BDS-Auto-Enable", bdsAutoEnable.getProjectVersion(), bdsAutoEnable.getVersionManager().getLoadedVersion());

        System.out.println(mclogsClient);
        System.out.println(mclogsClient.getInstance());
    }

    public void sendLog() {
        try {
            final Log log = new Log(this.logger.getLogFile().toPath());
            final CompletableFuture<UploadLogResponse> future = this.mclogsClient.uploadLog(log);
            final UploadLogResponse response = future.get();
            System.out.println(response.getUrl());
        } catch (final Exception exception) {
            exception.printStackTrace();
        }
    }
}

Add to maven repo

I think it would be useful to have this in a Maven repo so it's not necessary to add this as a git submodule if you want to use it

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.