Skip to content

Commit

Permalink
disable debug logging (issue not fully resolved)
Browse files Browse the repository at this point in the history
File/Dir permission issue is still unresolved, so anyone working on troubleshooting will need to manually re-enable logging when needed.
ncbo/bioportal-project#323
  • Loading branch information
alexskr committed Sep 22, 2024
1 parent 70fc2c8 commit f32bc17
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/ontologies_linked_data/models/ontology_submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,15 @@ def self.copy_file_repository(acronym, submissionId, src, filename = nil)
path_to_repo = File.join([LinkedData.settings.repository_folder, acronym.to_s, submissionId.to_s])
name = filename || File.basename(File.new(src).path)
# THIS LOGGER IS JUST FOR DEBUG - remove after NCBO-795 is closed
logger = Logger.new(Dir.pwd + "/create_permissions.log")
# https://github.com/ncbo/bioportal-project/issues/323
# logger = Logger.new(Dir.pwd + "/logs/create_permissions.log")
if not Dir.exist? path_to_repo
FileUtils.mkdir_p path_to_repo
logger.debug("Dir created #{path_to_repo} | #{"%o" % File.stat(path_to_repo).mode} | umask: #{File.umask}") # NCBO-795
# logger.debug("Dir created #{path_to_repo} | #{"%o" % File.stat(path_to_repo).mode} | umask: #{File.umask}") # NCBO-795
end
dst = File.join([path_to_repo, name])
FileUtils.copy(src, dst)
logger.debug("File created #{dst} | #{"%o" % File.stat(dst).mode} | umask: #{File.umask}") # NCBO-795
# logger.debug("File created #{dst} | #{"%o" % File.stat(dst).mode} | umask: #{File.umask}") # NCBO-795
if not File.exist? dst
raise Exception, "Unable to copy #{src} to #{dst}"
end
Expand Down

0 comments on commit f32bc17

Please sign in to comment.