Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add logging to files #257

Merged
merged 5 commits into from
Jul 31, 2020
Merged

add logging to files #257

merged 5 commits into from
Jul 31, 2020

Conversation

Uunnamed
Copy link
Contributor

#fixies #125

@@ -2894,6 +2894,7 @@
proxy
profile
headless
log-files
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут не очень, что файлы слиплись в одну мапу. Лучше отдельными ключами log-stdout и log-stderr

@@ -2939,7 +2940,7 @@

proc-args (drv/get-args @driver)
_ (log/debugf "Starting process: %s" (str/join \space proc-args))
process (proc/run proc-args)]
process (proc/run proc-args log-files)]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут их нужно будет передать мапой, вроде

{:log-stdout log-stdout
 :log-stderr log-stderr}


(defn get-null-file ^java.io.File
[]
(if-let [windows? (str/starts-with? (System/getProperty "os.name") "Windows")]
Copy link
Collaborator

@igrishaev igrishaev Jul 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут переменная windows? не нужна, поэтому просто if. Но еще лучше вынести ее на уровне def, потому что операционка не меняется в рантайме.

(def windows? ...)

(if windows? 
  ...
  ...)


(defn get-log-file
[file-path]
(if file-path (io/file file-path)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

положительную ветку перенести на след. строку после условия

README.md Outdated
@@ -986,6 +986,10 @@ skipped or have nil values. Some of them, if not passed, are taken from the
;; :err (aliases :error, :severe, :crit, :critical), :all. When not passed,
;; :all is set.
:log-level :err ;; to show only errors but not debug

;; Paths to log files
Copy link
Collaborator

@igrishaev igrishaev Jul 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут бы уточнить, что к логам именно вебдрайвера, а то не понятно

;; Paths to the driver's log files as strings.
;; When not set, the output goes to /dev/null (or NULL on Windows)
:log-stdout  "/path/to/stdout.log"
:log-stderr  "/path/to/stderr.log"

(:import java.lang.IllegalThreadStateException
java.io.IOException))

(def windows? (str/starts-with? (System/getProperty "os.name") "Windows"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут двойной пробел после with?

@Uunnamed Uunnamed merged commit 35f94c6 into master Jul 31, 2020
@Uunnamed Uunnamed deleted the add-logging-to-files branch July 31, 2020 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants