Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Myaktion Go
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Emanuel Petrinovic
Myaktion Go
Commits
15fca519
Commit
15fca519
authored
2 months ago
by
Emanuel Petrinovic
Browse files
Options
Downloads
Patches
Plain Diff
add logrus
parent
cda4df04
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/myaktion/go.mod
+5
-1
5 additions, 1 deletion
src/myaktion/go.mod
src/myaktion/go.sum
+11
-0
11 additions, 0 deletions
src/myaktion/go.sum
src/myaktion/main.go
+13
-1
13 additions, 1 deletion
src/myaktion/main.go
with
29 additions
and
2 deletions
src/myaktion/go.mod
+
5
−
1
View file @
15fca519
...
...
@@ -2,4 +2,8 @@ module gitlab.reutlingen-university.de/petrinov/myaktion-go
go 1.24.2
require github.com/gorilla/mux v1.8.1 // indirect
require (
github.com/gorilla/mux v1.8.1 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
)
This diff is collapsed.
Click to expand it.
src/myaktion/go.sum
+
11
−
0
View file @
15fca519
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
This diff is collapsed.
Click to expand it.
src/myaktion/main.go
+
13
−
1
View file @
15fca519
package
main
import
(
"log"
"net/http"
"os"
"github.com/gorilla/mux"
log
"github.com/sirupsen/logrus"
"gitlab.reutlingen-university.de/petrinov/myaktion-go/handler"
)
func
init
()
{
log
.
SetFormatter
(
&
log
.
TextFormatter
{})
log
.
SetReportCaller
(
true
)
level
,
err
:=
log
.
ParseLevel
(
os
.
Getenv
(
"LOG_LEVEL"
))
if
err
!=
nil
{
log
.
Info
(
"Log level not specified , set default to: INFO"
)
log
.
SetLevel
(
log
.
InfoLevel
)
return
}
log
.
SetLevel
(
level
)
}
func
main
()
{
log
.
Println
(
"Starting My-Aktion API server"
)
router
:=
mux
.
NewRouter
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment