-- Leo's gemini proxy

-- Connecting to senders.io:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; lang=en;

Devlog 3 - Maven and Logging


I didn't get a lot done during the week, but on Friday and Saturday evening I was able to work a bit more. On Saturday I deployed my standalone server into prod under a test port. I was able to iron out some logging kinks and some other setup stuff. But I wasted a lot of time on /extra/ things.


Maven


Maven has a lot of useful plugins for automating certain tasks. I got it so I can assmble a tar.gz of the standable server that I can share, so I feel I am one step closer to alpha. However, I got buried deep in the plugin blackhole... I wanted to get my javadoc deployed too to my website and licenses in order. Sadly, everyone seems to do things slightly differently and it ended up soaking up a lot of time that I could've spent elsewhere.


Prod Swap


I am going to cut it out and follow my previous devlogs outline and try and get the server into prod this coming week. I don't expect to have it in a position where I can deploy it to maven central or anything for alpha (though solving some of this will move me closer). But I am delaying a lot of other important work.


Logging


The main development change that I did was fixing how I write my logs. Right now I have 3 logs being written:


all.log

access.log

error.log


all.log


My all.log is just everything the server outputs. So is comprised of general info+ logging from the server, access logs, and error logs.


access.log


This is the IO logging for the server. Logging requests and responses in a tab separated format:


2021-04-04T20:54:21,170Z        IN      /67.86.129.151:45974    gemini://senders.io:19650/gemlog/path/bad.txt   45
2021-04-04T20:54:21,177Z        OUT     51      /gemlog/path/bad.txt not found  35
2021-04-04T20:55:10,442Z        IN      /67.86.129.151:45998    gemini://senders.io:19650/gemlog/2021-03-28-devlog-2-unit-tests-and-streams.gmi 79
2021-04-04T20:55:10,473Z        OUT     20      text/gemini; lang=en;   3335
2021-04-04T20:55:12,066Z        IN      /67.86.129.151:46000    gemini://senders.io:19650/gemlog/2021-03-25-when-is-it-time-to-move-on.gmi      74
2021-04-04T20:55:12,067Z        OUT     20      text/gemini; lang=en;   6131

error.log


It can be nice to have errors written out separately, can be used as a metric/trigger when content/the file changes.


customization


I've set it up so you can roll our own logging implementation if you want. By default we use logback and SLF4J since that is pretty standard in the Java world. However, you can specify your own logback.xml or your own AccessLogger with its own format. It's not pluggable at the moment. But I've laid the foundation to allow this to be configured when setting up your server!


What next?


I want to focus on wrapping up the custom access logging and javadocs. I want to get the server in prod so I can do my server cert swap too.


Links


Gemlog

Home


-- Response ended

-- Page fetched on Thu Mar 28 17:25:11 2024