1

we are using Hudson for CI of an Android project with Android emulator plugin to run UI tests on the emulator. A git project delivers the source code.

Now I see that in the git repo, for each build a logcat file is created and put in the git project folder, which is then pushed back to git. As we are expecting a lot of builds, this could easily spam the project folder. Does anyone know if it is possible to set the destination folder for the emulator logs? I cannot find any options in the emulator plugin or Hudson anywhere.

The logcat files are named logcat_[some_number].log.

Best regards, Kim

Christopher Orr
  • 106,059
  • 26
  • 192
  • 189
Micky
  • 5,411
  • 7
  • 26
  • 54

3 Answers3

2

Upgrade to version 2.0 of the plugin (or newer) and you'll see these logcat files are now written to a temporary directory, rather than your workspace.

If you're using Hudson, possibly you only see the very old version 1.6 in the Update Centre.
Which is just another reason to upgrade to Jenkins! :)

However, if you can't upgrade either the plugin or Jenkins (for some weird reason), just use an "Execute shell" step to delete any logcat_*.log files at the start of each build.
These files are purely temporary anyway and should probably only exist in your workspace after a failed build — otherwise the logcat output is archived automatically as logcat.txt.

Community
  • 1
  • 1
Christopher Orr
  • 106,059
  • 26
  • 192
  • 189
1

Add an ant task to rename the logcat file to your convenience and remove the oldest ones.

Snicolas
  • 36,854
  • 14
  • 106
  • 172
1

add the logs to the .gitignore file, if you want to exclude them from your repository.

Matthias B
  • 5,027
  • 1
  • 40
  • 46