mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-07-01 12:57:26 +00:00
[Change] Main 调整日志输出级别, 补充日志输出内容;
[Change] Dockerfile.sample 调整镜像内应用运行路径;
This commit is contained in:
@ -1,8 +1,7 @@
|
|||||||
FROM openjdk:8u252-jre
|
FROM openjdk:8u252-jre
|
||||||
|
|
||||||
ENV jarFileName=ContentGrabbingJi-exec.jar
|
ENV jarFileName=ContentGrabbingJi-exec.jar
|
||||||
COPY ${jarFileName} /program/CGJ.jar
|
COPY ${jarFileName} /CGJ.jar
|
||||||
RUN mkdir /program/data
|
RUN mkdir /data/
|
||||||
|
|
||||||
WORKDIR /program/data
|
CMD java -Dcgj.logsPath=/data/logs -jar /CGJ.jar botMode -botDataDir=/data
|
||||||
CMD java -jar /program/CGJ.jar botMode
|
|
@ -52,6 +52,7 @@ public class Main {
|
|||||||
|
|
||||||
public static void main(String[] args) throws IOException, ClassNotFoundException {
|
public static void main(String[] args) throws IOException, ClassNotFoundException {
|
||||||
log.trace("ContentGrabbingJi 正在启动...");
|
log.trace("ContentGrabbingJi 正在启动...");
|
||||||
|
log.debug("Args: {}, LogsPath: {}", Arrays.toString(args), System.getProperty("cgj.logsPath"));
|
||||||
log.debug("运行目录: {}", System.getProperty("user.dir"));
|
log.debug("运行目录: {}", System.getProperty("user.dir"));
|
||||||
ArgumentsProperties argsProp = new ArgumentsProperties(args);
|
ArgumentsProperties argsProp = new ArgumentsProperties(args);
|
||||||
if(argsProp.containsKey("proxy")) {
|
if(argsProp.containsKey("proxy")) {
|
||||||
@ -85,7 +86,7 @@ public class Main {
|
|||||||
|
|
||||||
File cookieStoreFile = new File(System.getProperty("cgj.botDataDir"), "cookies.store");
|
File cookieStoreFile = new File(System.getProperty("cgj.botDataDir"), "cookies.store");
|
||||||
if(!cookieStoreFile.exists()) {
|
if(!cookieStoreFile.exists()) {
|
||||||
log.error("未找到cookies.store文件, 是否启动PixivLoginProxyServer? (yes/no)");
|
log.warn("未找到cookies.store文件, 是否启动PixivLoginProxyServer? (yes/no)");
|
||||||
Scanner scanner = new Scanner(System.in);
|
Scanner scanner = new Scanner(System.in);
|
||||||
if(scanner.nextLine().equalsIgnoreCase("yes")) {
|
if(scanner.nextLine().equalsIgnoreCase("yes")) {
|
||||||
startPixivLoginProxyServer();
|
startPixivLoginProxyServer();
|
||||||
|
Reference in New Issue
Block a user