Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BudgetMaster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robert Goldmann
BudgetMaster
Commits
2ca765b1
Commit
2ca765b1
authored
8 years ago
by
Robert Goldmann
Browse files
Options
Downloads
Patches
Plain Diff
Fixed
#46
- enabled error log for server
parent
3de5a46b
No related branches found
No related tags found
1 merge request
!58
merge new_database_structure into master
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/de/deadlocker8/budgetmasterserver/server/SparkServer.java
+16
-4
16 additions, 4 deletions
...de/deadlocker8/budgetmasterserver/server/SparkServer.java
with
16 additions
and
4 deletions
src/de/deadlocker8/budgetmasterserver/server/SparkServer.java
+
16
−
4
View file @
2ca765b1
package
de.deadlocker8.budgetmasterserver.server
;
import
static
spark
.
Spark
.*;
import
static
spark
.
Spark
.
after
;
import
static
spark
.
Spark
.
before
;
import
static
spark
.
Spark
.
delete
;
import
static
spark
.
Spark
.
get
;
import
static
spark
.
Spark
.
halt
;
import
static
spark
.
Spark
.
port
;
import
static
spark
.
Spark
.
post
;
import
static
spark
.
Spark
.
put
;
import
static
spark
.
Spark
.
secure
;
import
java.io.File
;
import
java.io.IOException
;
import
java.net.URISyntaxException
;
import
java.nio.file.Files
;
...
...
@@ -40,10 +49,13 @@ public class SparkServer
private
static
Gson
gson
;
private
static
DatabaseHandler
handler
;
// DEBUG move main method to extra file and start SparkServer from there
public
static
void
main
(
String
[]
args
)
throws
URISyntaxException
{
// DEBUG
Logger
.
setLevel
(
LogLevel
.
ALL
);
File
logFile
=
new
File
(
Paths
.
get
(
SparkServer
.
class
.
getProtectionDomain
().
getCodeSource
().
getLocation
().
toURI
()).
getParent
().
toFile
()
+
"/error.log"
);
Logger
.
enableFileOutput
(
logFile
);
Logger
.
info
(
"Initialized SparkServer"
);
gson
=
new
GsonBuilder
().
setPrettyPrinting
().
create
();
...
...
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