কম্পিউটার

জাভা 9 এ ইউনিফাইড JVM লগিং কি?


জাভা 9 একটি বিশদ স্তর সহ JVM উপাদানগুলির জন্য একটি সাধারণ লগিং সিস্টেম সরবরাহ করতে পারে। একটি নতুন কমান্ড-লাইন বিকল্প ব্যবহার করে: -Xlog সকল লগিং সেটিংসের জন্য এবং ইউনিফাইড JVM লগিং মূল কারণ বিশ্লেষণ (RCA) করতে আমাদের একটি সহজে কনফিগার করার টুল দেয় জটিল সিস্টেম-স্তরের JVM উপাদানগুলির।

কমান্ড লাইন -Xlog সমস্ত লগিং JVM উপাদান নিয়ন্ত্রণের জন্য ব্যবহার করা যেতে পারে। -Xlog এর আর্গুমেন্টস নিচের নিয়মগুলি অনুসরণ করুন:

  • কমান্ড-লাইনে প্রদর্শিত ক্রমে একাধিক আর্গুমেন্ট প্রয়োগ করা হয়েছে।
  • শেষ কনফিগারেশন নিয়ম:একই আউটপুটের জন্য, একাধিক আর্গুমেন্ট প্রদত্ত ক্রমে একে অপরকে ওভাররাইড করতে পারে।

Xlog:নিষ্ক্রিয় করুন সমস্ত লগিং বন্ধ করে এবং লগিং ফ্রেমওয়ার্কের সমস্ত কনফিগারেশন সাফ করে (সতর্কতা সহ এবং ত্রুটি )।

সিনট্যাক্স

-Xlog:tag[*][=level][:output:decoration:output-option],tag...

-Xlog:সাহায্য প্রিন্ট -Xlog ব্যবহার সিনট্যাক্স এবং উপলব্ধ ট্যাগ, স্তর, ডেকোরেটর কিছু উদাহরণ কমান্ড লাইন সহ।

1) ট্যাগ :যখন একটি লগ বার্তা প্রদর্শিত হয়, এটি JVM-এর ট্যাগের একটি সেটের সাথে যুক্ত থাকে যা নাম দ্বারা চিহ্নিত করা হয়:os, gc, মডিউল। আমরা পৃথক ট্যাগগুলির জন্য বিভিন্ন সেটিংস প্রয়োগ করি এবং '*' একটি 'ওয়াইল্ডকার্ড' ট্যাগ মিলকে বোঝায়।

2) স্তরগুলি৷ :আমরা বিভিন্ন স্তরে লগিং করি এবং উপলব্ধ স্তরগুলি হল ত্রুটি, সতর্কতা, তথ্য, ডিবাগ, ট্রেস এবং বিকাশ। লগিং অক্ষম করতে, তারপর বিকল্প বন্ধ ব্যবহার করুন।

3) আউটপুট :আউটপুট তিন ধরনের সমর্থন করে:stdout, stderr, এবং টেক্সট ফাইল লিখিত আকারের উপর ভিত্তি করে লগ ফাইল ঘূর্ণনের জন্য সেট আপ করার জন্য এবং ঘোরানোর জন্য অনেকগুলি ফাইল৷

4) ডেকোরেটর :ডেকোরেটর নামক বার্তা সম্পর্কে আরও বিশদ রয়েছে। এখানে তালিকা:

  • time/timemillis/timenanos :বর্তমান সময় এবং তারিখ (ISO-8601 ফরম্যাট)
  • uptime/uptimemillis/uptimenanos :JVM শুরু হওয়ার পর থেকে সময়
  • pid :প্রক্রিয়া শনাক্তকারী
  • tid :থ্রেড শনাক্তকারী
  • স্তর :লগ বার্তার সাথে যুক্ত স্তর
  • ট্যাগ :লগ বার্তার সাথে যুক্ত ট্যাগ


C:\Program Files\Java\jdk-9.0.4\bin>java -Xlog:help
-Xlog Usage: -Xlog[:[what][:[output][:[decorators][:output-options]]]]
where 'what' is a combination of tags and levels of the form tag1[+tag2...][*][=level][,...]
Unless wildcard (*) is specified, only log messages tagged with exactly the tags specified will be matched.

Available log levels:
off, trace, debug, info, warning, error

Available log decorators:
time (t), utctime (utc), uptime (u), timemillis (tm), uptimemillis (um), timenanos (tn), uptimenanos (un), hostname(hn), pid (p), tid (ti), level (l), tags (tg)
Decorators can also be specified as 'none' for no decoration.

Available log tags:
add, age, alloc, aot, annotation, arguments, attach, barrier, biasedlocking, blocks, bot, breakpoint, census, class, classhisto, cleanup, compaction, constraints, constantpool, coops, cpu, cset, data, defaultmethods, dump, ergo, exceptions, exit, fingerprint, freelist, gc, hashtables, heap, humongous, ihop, iklass, in it, itables, jni, jvmti,liveness, load, loader, logging, mark, marking, methodcomparator, metadata, metaspace, mmu, module, monitorinflation,monitormismatch, nmethod, normalize, objecttagging, obsolete, oopmap, os, pagesize, patch, path, phases, plab, promotion,preorder, protectiondomain, ref, redefine, refine, region, remset, purge, resolve, safepoint, scavenge, scrub, stacktrace,stackwalk, start, startuptime, state, stats, stringdedup, stringtable, stackmap, subclass, survivor, sweep, task, thread,tlab, time, timer, update, nload, verification, verify, vmoperation, vtables, workgang, jfr, system, parser, bytecode,setting, event Specifying 'all' instead of a tag combination matches all tag combinations.

Described tag combinations:
logging: Logging for the log framework itself

Available log outputs:
stdout, stderr, file=
Specifying %p and/or %t in the filename will expand to the JVM's PID and startup timestamp, respectively.

Some examples:
-Xlog
Log all messages using 'info' level to stdout with 'uptime', 'levels' and 'tags' decorations.
(Equivalent to -Xlog:all=info:stdout:uptime,levels,tags).

-Xlog:gc
Log messages tagged with 'gc' tag using 'info' level to stdout, with default decorations.

-Xlog:gc,safepoint
Log messages tagged either with 'gc' or 'safepoint' tags, both using 'info' level, to stdout, with default
decorations.
(Messaged tagged with both 'gc' and 'safepoint' will not be logged.)

  1. জাভাতে StringIndexOutOfBoundsException কি?

  2. জাভাতে ArrayIndexOutOfBoundsException কি?

  3. জাভাতে ডাবল-বাফারিং কি?

  4. জাভা প্রোগ্রামিং কি?