google / google/j2objc

iOS: "java.io.IOException: Couldn't get lock for" while create instance of FileHandler

Open
#1,226 3 comments 0 reactions 1 assignee Claimed by @tomball View on GitHub
Dominant language
Java
Stars
6k
Forks
999
Avg merge
19h 20m
Merged PRs (30d)
14

Description

Hi! I'm trying to add logging to file in iOS (in Android it works fine), but when I create an instance of FileHandler, get IOException telling that "Couldn't get lock for [my absolute path to log file]". What I'm doing wrong?
Problematic piece of code:
FileHandler handler = new FileHandler(getFilePath(name), MAX_LOG_FILE_SIZE,
MAX_LOG_FILE_COUNT, true);
P.S.: I checked the existence of all folders in the path - everything is fine.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.