lib/universa/service.rb in universa-3.9.15.2 vs lib/universa/service.rb in universa-3.9.17.1

- old
+ new

@@ -6,17 +6,29 @@ # the {UMI} interface and reference class factory are unique per-process for Universa # library. It uses exactly one lazy created {UMI} connection which is shared among all threads. # As UMI server is multithreaded by nature, is will not block ruby threads waiting for remote # invocation. class Service + + @@log_umi = false + + # set log mode for UMI commands. Works only when called before any Service usage, e.g. before the + # UMI client has been constructed. + def self.log_umi + @@log_umi = true + end + include Singleton # Setup service initial parameters def initialize @config = SmartHash.new path: nil + @@log_umi && @config['log'] = 'umi.log' @known_proxies = {} - [Contract, PrivateKey, PublicKey, KeyAddress, HashId, Binder, Role, ChangeOwnerPermission, RevokePermission, - SplitJoinPermission, UmiClient].each {|klass| register_proxy klass} + [Contract, PrivateKey, PublicKey, KeyAddress, HashId, Binder, + Role, SimpleRole, RoleLink, ListRole, + ChangeOwnerPermission, RevokePermission, ModifyDataPermission, SplitJoinPermission, + UmiClient, Duration].each {|klass| register_proxy klass} end # Implementation of {Service.configure} def configure &block raise Error, "config call must happen before interface creation" if @umi